-
Notifications
You must be signed in to change notification settings - Fork 21
Feat/generate sn6 schema validation #394
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
base: main
Are you sure you want to change the base?
Feat/generate sn6 schema validation #394
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
…nto feat/generate-sn6-schema-validation
ubmarco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing a test for this. Ideally the generated schema.json is tested against the same SCORE metamodel tests. Then we can be sure the migration was successful.
| # req-Id: tool_req__docs_common_attr_status | ||
| status: ^(valid|draft)$ | ||
| content: ^[\s\S]+$ | ||
| content: ^(.|[\n\r])+$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check whether these regexes make any trouble in SN6.
Maybe they work in jsonschema-rs. I changed those before we did the migration from jsonschema to jsonschema-rs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-introduced the original regex string, which runs as expected.
| Schema structure per need type (sphinx-needs schema format): | ||
| - ``select`` : matches needs by their ``type`` field | ||
| - ``validate.local`` : validates the need's own properties (patterns, required) | ||
| - ``validate.network`` : validates properties of linked needs (NOT YET ACTIVE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is network not yet active? Is that a thing for another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Just feared this is too big. Looking into it right now. Change size seems to be acceptable, so I'll include it in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…n by refining regex patterns and adding type hints
|
Thanks for the review!
Yeah this was still work in progress. I introduced a refactored/more testable version of the sn_schemas transformation, including unit/integration tests. |
…ndatory links and updating tests
…ertions for clarity
📌 Description
🚨 Impact Analysis
✅ Checklist