Hi Arnab Thanks for the write-up and draft PR.
My main concern is the timing. There's an ongoing proposal proposal about an Ossie REST API, that defines how semantic model documents are defined/managed/versioned and validated. I think we should be aligned with Ossie REST API (the bundled schema, version-to-schema selection, and the validate(SemanticModelDocument, JsonNode) signature) else we will rework. Adding a new dependency and changing the validator interface are both harder to undo once they are merged. I would rather wait for the Ossie REST API proposal (I think it will be close to land). On your two questions: 1. I have no objection in principal about the json-schema-validator dependency. It's AL 2.0, it's scoped to extensions/semantic-models, and the schema is vendored so there are no network calls. I would still hold the Ossie API as it could bring a different validator or schema distribution model (in discussion right now). NB: we should double check the itu transitive (in LICENSE/NOTICE). 2. Avoiding a double parse is a reasonable goal. Since this is an extension point, I would like to see it settled together with the Ossie REST API direction, not ahead of it. Keeping the feature with ENABLE_SEMANTIC_MODELS limits the risk, but it doesn't remove the cost of changing the interface twice. I suggest to keep #5895 as a draft for now and link it from the Ossie REST API (https://github.com/apache/ossie/pull/573). Feel free to comment in the Ossie REST API PR :) Regards JB On 2026-10-28 11:13 UTC Arnab Karmakar wrote: > Hi, > > I'm working on Implement semantic model document validation (#5205) > <https://github.com/apache/polaris/issues/5205> and have opened a draft PR: > > #5895 <https://github.com/apache/polaris/pull/5895> > > *Summary*: Create/update validate the semantic_model body against a bundled > Apache Ossie JSON Schema (version selected by the document’s version, > currently 0.2.0.dev0 only). Oversized bodies are rejected via a new realm > flag SEMANTIC_MODEL_MAX_DOCUMENT_BYTES (default 1 MiB), checked in the > catalog before parsing. > > Two items I’d like dev-list input on before marking the PR ready for review: > > 1. > > New dependency: com.networknt:json-schema-validator 1.5.9 (Apache 2.0), > used only in extensions/semantic-models for draft 2020-12 schema > validation on Jackson JsonNodes. Transitive com.ethlo.time:itu is listed > in the server distribution LICENSE. No network access at validation time; > the Ossie schema is vendored on the classpath. > 2. > > Interface change: > SemanticDocumentValidator#validate(SemanticModelDocument) becomes > validate(SemanticModelDocument, > JsonNode) so the body is not parsed twice. There are no other > implementations today; semantic models remain behind > ENABLE_SEMANTIC_MODELS (beta, off by default). Version -> schema > selection is a plain switch on spec version (no CDI), as per discussion on > the issue. > > If there are any concerns about the dependency choice or the signature > change, please reply here. > Thanks, > > Arnab >
