-
Notifications
You must be signed in to change notification settings - Fork 276
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
json schema refactor. #2384
base: main
Are you sure you want to change the base?
json schema refactor. #2384
Conversation
…a fields and so we can have strict validation. 2/ Removed "minItems" from scalar properties (e.g., for string or number). Because thing could go haywire as keyword "minItems" should be used for array, while the keyword "minItems used in type string and number. 3/ Unified enum values for "image-pull-policy" and "restart-policy" to avoid duplicates and different case variants. 4/ Factored out complex regex patterns for ports and publish into separate definitions (port-pattern and publish-pattern). 5/ Switched kinds from many hardcoded properties to a single patternProperties rule for flexibility in topology.kinds. 6 / AllOf logic remains intact for kind-conditional type constraints, but ensured they don’t contradict each other.
@@ -0,0 +1,924 @@ | |||
{ | |||
"$id": "https://containerlab.dev/clab.schema.json", |
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.
@asadarafat what is this file for?
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.
@hellt, I assume you are referring to schemas/clab.schema.jsonc
. It is essentially the same as clab.schema.json
, but with added comments. The .jsonc
format is supported by VSCode, allowing for better readability and enhanced documentation within the file.
this is too big to be merged in one go Remove the duplicate files, keep the jsonc and add a make target |
Can you elaborate what do you mean by smaller chunk, perhaps with some example of the chunks?Cheers/AsadAm 31.01.2025 um 23:34 schrieb Roman Dodin ***@***.***>:
this is too big to be merged in one go
we need to raise it in smaller chunks
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
the changes should be scoped to a smaller amount of existing schema, so it would be easier to test the changes. |
Got it.Cheers/AsadAm 01.02.2025 um 00:26 schrieb Roman Dodin ***@***.***>:
Can you elaborate what do you mean by smaller chunk, perhaps with some example of the chunks?
the changes should be scoped to a smaller amount of existing schema, so it would be easier to test the changes.
Take one improvement out of many and create it as a PR instead of having all of them tucked together as an example
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
additionalProperties
: false is used in more place to forbid extra fields and so we can have strict validation.minItems
from scalar properties (e.g., for string or number). Because thing could go haywire as keywordminItems
should be used for array, while the keywordminItems
used in type string and number in previous schemamage-pull-policy
andrestart-policy
to avoid duplicates and different case variants.