Selection of a JSON Schema Validation Strategy #101
Replies: 1 comment
-
In Nikita, all actions define an associated schema. It maximizes the usage of For example, the {
"disk": {
"type": "object",
"default": {},
"patternProperties": {
".*": {
"$ref": "module://@nikitajs/incus/config/device#/definitions/disk/properties/properties"
}
}
}
} You'll notice that the configuration of a Nikita action is not the JSON schema but registered as the It is also perfectly fine to use |
Beta Was this translation helpful? Give feedback.
-
I am considering several strategies for validating variable files against JSON schemas and would like to open up a discussion to help select the most effective approach.
Below are the current strategies I've identified, along with some pros and cons for each. I'm eager to hear your thoughts, feedback, or any additional options I might not have considered!
JSON Schema Validation Strategies
A single service can have either none, one or multiple schema defined among collections.
Individual Schema Validation (current approach)
Concatenate Schemas into a Single Schema
2.1. Using
allOf
(initial approach)allOf
for a unified validation.2.2. Manual Concatenation
Last Schema in Collection Validation
I'm interested in hearing your feedback on:
Thanks in advance for your input. Looking forward to a productive discussion!
Beta Was this translation helpful? Give feedback.
All reactions