Implement semantic model document validation
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 522
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 137
Description
### Is your feature request related to a problem? Please describe.
PR #4961 introduces the `SemanticDocumentValidator` interface, but intentionally defers the concrete validation implementation.
This issue tracks implementing write time validation for Apache Ossie semantic model documents.
## Scope
Implement a concrete `SemanticDocumentValidator` that:
1. Validates semantic model documents against the Apache Ossie JSON Schema.
2. Enforces configurable document size limits.
3. Returns clear client errors for malformed or invalid documents.
4. Integrates validation into semantic model create and update operations.
5. Adds unit and integration tests covering valid documents, schema violations, malformed input, and size limit violations.
## Additional considerations
The implementation should avoid network access during validation and should package or otherwise reliably load the supported schema version.
We should also define how schema versions are selected and how compatibility will be handled as Apache Ossie evolves.
Related review discussion: https://github.com/apache/polaris/pull/4961#discussion_r3670371585
Contributor guide
Research direction
Start with PR #4961 and the SemanticDocumentValidator interface, then trace the semantic model create and update operations. Define how the supported Apache Ossie JSON Schema is loaded and versioned without network access, and add unit and integration tests demonstrating valid documents, schema violations, malformed input, and size-limit errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, json
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100