SOF-7827: introduce applications schema with build config#388
SOF-7827: introduce applications schema with build config#388
Conversation
…alProperties to false
| "type": "object" | ||
| } | ||
| }, | ||
| "application": { |
schema/workflow/base.json
Outdated
| } | ||
| }, | ||
| "application": { | ||
| "description": "information about the simulation engine/application.", |
There was a problem hiding this comment.
Information about the "main application" used for categorization purposes
| addFormats(ajvValidatorAndCleaner); | ||
| addFormats(ajvValidatorAndCleanerNoDefaults); | ||
| addFormats(ajvValidatorAndCleanerWithCoercingTypes); | ||
| addFormats(ajvValidatorAndCleanerWithCoercingTypesNoDefaults); |
There was a problem hiding this comment.
@pranabdas, why may we not want to use schemas default values?
There was a problem hiding this comment.
@k0stik while validating and cleaning schemas with validateAndClean, it is injecting default properties such as schemaVersion, which are not present in the original schema. This gives the option to avoid that behavior.
esse/schema/system/schema_version.json
Line 10 in 3fb9fa1
| "type": "object", | ||
| "$ref": "application/build_config.json" | ||
| }, | ||
| "additionalProperties": true |
There was a problem hiding this comment.
Is there a real need for "additionalProperties": true here and in other schemas? This prevents AJV from cleaning redundant data, and in most cases, we can avoid using additionalProperties
There was a problem hiding this comment.
In case we need additionalProperties, it should be placed on the same level as properties and allOf, not inside properties.
Correct:
{
"allOf": [...],
"properties": {...},
"additionalProperties": true
}Wrong:
{
"allOf": [...],
"properties": {
"additionalProperties": true
},
}There was a problem hiding this comment.
Definitely can remove it here. Actually, I had to remove additionalProperties from schema/software/application.json to be able to clean unwanted keys. But not sure about numerous other places.
No description provided.