fix(schema): align schema root with wrapped example format#72
Open
aorzelskiGH wants to merge 1 commit into
Open
fix(schema): align schema root with wrapped example format#72aorzelskiGH wants to merge 1 commit into
aorzelskiGH wants to merge 1 commit into
Conversation
All example files in partials/examples/*.json wrap their access-rule document in a top-level "AllAccessPermissionRules" key, but the root of aas-queries-and-access-rules-schema.json was set to validate the inner rules object directly. As a result, none of the shipped examples validated against the shipped schema. This change introduces an "AccessRulesDocument" definition that expects the wrapper and retargets the root $ref: "$ref": "#/definitions/AccessRulesDocument" AccessRulesDocument: - required: ["AllAccessPermissionRules"] - AllAccessPermissionRules -> existing definition (unchanged) - additionalProperties: false No change to the shape of "AllAccessPermissionRules" itself; all existing rule content continues to validate unchanged. Refs: Review Finding T-03 Made-with: Cursor
Martin187187
approved these changes
Apr 20, 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.
Summary
Aligns the root of
aas-queries-and-access-rules-schema.jsonwiththe wrapper format used consistently by every example under
partials/examples/*.json.Problem
All shipped examples wrap their content in a top-level
"AllAccessPermissionRules"key:{ "AllAccessPermissionRules": { "rules": [ ... ] } }But the schema root was:
which matches the inner object (the one whose
rulesis required),not the outer wrapper. Consequently, none of the shipped examples
validate against the shipped schema out of the box.
Solution
Introduce a thin wrapper definition
AccessRulesDocumentwith asingle required property
AllAccessPermissionRules, and retarget theroot
$ref:The internal shape of
AllAccessPermissionRulesis untouched.Impact
expected by validators changes.
hand-stripped the wrapper must either wrap their payload or
continue to validate against
#/definitions/AllAccessPermissionRulesdirectly.Review notes
already validates the inner shape; if so, that is still
reachable via
$ref: "#/definitions/AllAccessPermissionRules".aas-specs-api) is intentionally not touched — theQuery examples there are already unwrapped (
{"$condition": …}),consistent with their schema root.
Related
Review Finding T-03: Schema/example wrapper mismatch.