Add comprehensive test coverage for Relations and ucumUnit#171
Merged
Conversation
Covers schema validation for: - ucumUnit keyword (valid numeric, invalid non-numeric, invalid value types) - Relations keywords (identity, relations, targettype, cardinality, scope, qualifiertype) - Both valid and invalid schema patterns All 11 SDK languages: TypeScript, Python, .NET, Java, Go, Rust, Ruby, Perl, PHP, Swift, C Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add Units and Relations extension keyword sets - Validate ucumUnit: must be string, only on numeric types - Validate identity: must be array of strings, only on object/tuple - Validate relations: check targettype, cardinality, scope, qualifiertype - Un-skip all related tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add JSONStructureRelations to known extensions - Validate ucumUnit: must be string, only on numeric types - Validate identity: must be array of strings, only on object/tuple - Validate relations: check targettype, cardinality, scope, qualifiertype - Un-skip all related tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add ucumUnit and relations keywords to known keyword list - Add JSONStructureRelations to known extensions - Validate ucumUnit: must be string, only on numeric types - Validate identity: must be array of strings, only on object/tuple - Validate relations: check targettype, cardinality, scope, qualifiertype - Un-skip all related tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PHP: Escape $ref in double-quoted string interpolation at line 633 to prevent 'Undefined variable \' warning (triggered by 4 tests). Perl: Add looks_like_number() check to catch numeric scalars passed as ucumUnit value (JSON number 42 was not caught by ref() check). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cement All 11 SDKs now have full spec coverage for extension keyword gating: - C, Ruby: Added Validation extension gating (warn when validation keywords like pattern, minLength, etc. are used without $uses: [JSONStructureValidation]) - All 10 non-TS SDKs: Added unit/currency/symbols gating under JSONStructureUnits extension. The unit keyword now gets string + numeric type validation (same as ucumUnit). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests using the unit keyword need JSONStructureUnits in $uses now that extension gating is enforced. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds 33 new tests (124 total, 9 skipped) covering: - $extends: valid, invalid target, circular, deep circular, non-string - Nested invalid schemas: inside properties, items, values, definitions - Multiple simultaneous errors in one schema - Extension keyword nesting (root $uses enabling nested keywords) - Complex $ref positions: unions, relations targettype/qualifiertype - $id edge cases: missing, empty, relative URI, valid URN - name edge cases: digit prefix, spaces, valid underscore - Enum edge cases: null values, single element, duplicates - Choice type: empty, invalid, valid multi-choice - Unknown keywords: silently ignored 9 tests are skipped with TODO comments documenting validator gaps: - $extends target type enforcement - Tuple entry type reference resolution - Root $uses inheritance into nested schemas - $id URI syntax validation - name identifier syntax enforcement - Enum value type checking against declared type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Implement remaining validation features across all 11 SDKs: - target must resolve to object/tuple type - Tuple entries validated for existence - Empty rejected - must have URI scheme - name must be valid identifier syntax - Enum values checked against declared type - Fix inheritance: nested schemas inherit root (Go, Java, TypeScript) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Only enforce object/tuple type requirement when the target has an explicit 'type' field. Schemas using composition (allOf/oneOf/anyOf) without 'type' are valid \ targets. Also fix Perl SCHEMA_CONSTRAINT_VALUE_INVALID missing constant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The meta-schemas use \ with map types (e.g., ImportAddIn extends Namespace which is type:map). Broaden check to reject only primitive types, not all non-object/tuple types. Also add SCHEMA_CONSTRAINT_VALUE_INVALID to Perl ErrorCodes exports. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Without following the \ chain recursively, circular references spanning multiple hops (A→B→C→A) would not be detected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds test cases across all 11 SDK languages covering:
ucumUnit keyword:
Relations extension:
Addresses #167, #168