-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern api-gateway.json does not conform to JSON Schema draft 2020-12 #74
Comments
@lbulanti-ms do you mean that the core schema is wrong, which then correspondingly means the pattern is wrong or just the pattern? I think the former. It would be great if you could show the code section and also what you ran to perform the validation if that is something that would be reproducible so that the person fixing the bug could validate they had done it correctly. |
While there are other known issues with the core.json meta-schema(we raised a separate issue #75), this particular issue refers to the section below which uses the
To validate the schema I used the AJV library. I ran this command I am planning to raise a PR to fix this issue. |
Thanks @lbulanti-ms so the issue you're looking at is in the pattern itself, but I think we have the same issue in the core schema itself. "properties": {
"nodes": {
"type": "array",
"items": {
"$ref": "#/defs/node"
}
},
"relationships": {
"type": "array",
"items": {
"$ref": "#/defs/relationship"
}
},
"required": [
"nodes",
"relationships"
]
} Do you agree? |
@rocketstack-matt yes correct. I agree with you. The properties section of the core schema seems to have a couple of issues. Thank you for pointing this out! |
…ms keyword instead of items as per JSON Schema 2020-12
* #74 - Updating the api-gateway.json pattern to use the prefixItems keyword instead of items as per JSON Schema 2020-12 * Only run spectral validation on json and yaml files. * #74 - Adding placeholder values to api-gateway-implementation.json * Update api-gateway-implementation.json Remove the parties element which was removed form the schema. --------- Co-authored-by: Luigi Bulanti <[email protected]> Co-authored-by: Matthew Bain <[email protected]> Co-authored-by: rocketstack-matt <[email protected]>
…inos#79) * finos#74 - Updating the api-gateway.json pattern to use the prefixItems keyword instead of items as per JSON Schema 2020-12 * Only run spectral validation on json and yaml files. * finos#74 - Adding placeholder values to api-gateway-implementation.json * Update api-gateway-implementation.json Remove the parties element which was removed form the schema. --------- Co-authored-by: Luigi Bulanti <[email protected]> Co-authored-by: Matthew Bain <[email protected]> Co-authored-by: rocketstack-matt <[email protected]>
* #55 initial prototype of the CALM translator service * #55 Additional changes to the prototype translator to tidy up the c4 endpoints * #55 move project to be top level and add a README * #55 Fix to reference to calm schema from chaninging top level project * #55 Add dockerfile to containerize the application * Improvement to code to handle multiple software systems * #86 Update README * #86 Remove supress warnings annotation * Fix translator action * Fix translator action and checkin breaking test to confirm - test wil be removed before merge. * Update TestC4ModelTranslatorShould.java Removing the breaking test now we have proof it failed. * #35 Add manual spectral action (#68) * #35 Add manual spectral validation action * Fix indentation * Modify triggers for job * Validate samples instead of bad document * Change sample again to trigger build * PR feedback * Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs (#78) Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4. - [Release notes](https://github.com/webpack/webpack-dev-middleware/releases) - [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md) - [Commits](webpack/webpack-dev-middleware@v5.3.3...v5.3.4) --- updated-dependencies: - dependency-name: webpack-dev-middleware dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * created core cli (#53) (#80) * #74 - Updating the api-gateway.json pattern to use prefixItems (#79) * #74 - Updating the api-gateway.json pattern to use the prefixItems keyword instead of items as per JSON Schema 2020-12 * Only run spectral validation on json and yaml files. * #74 - Adding placeholder values to api-gateway-implementation.json * Update api-gateway-implementation.json Remove the parties element which was removed form the schema. --------- Co-authored-by: Luigi Bulanti <[email protected]> Co-authored-by: Matthew Bain <[email protected]> Co-authored-by: rocketstack-matt <[email protected]> * #42 removed old visualizer to make room for the new one (#83) * Fix spectral rules (#81) * #42 included initial visualization command in CLI (#85) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: rocketstack-matt <[email protected]> Co-authored-by: Matthew Bain <[email protected]> Co-authored-by: Will Osborne <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aidan McPhelim <[email protected]> Co-authored-by: Luigi Bulanti <[email protected]> Co-authored-by: Luigi Bulanti <[email protected]> Co-authored-by: jpgough-ms <[email protected]>
Bug Report
The api-gateway.json does not conform to the JSON Schema Draft 2020-12. As mentioned in the release notes the
items
keyword changed toprefixItems
.Additional Context:
This issue has been discovered while trying out the AJV library to validate the pattern schema against the CALM meta-schema
The text was updated successfully, but these errors were encountered: