Skip to content

SOF-7827: introduce applications schema with build config#388

Open
pranabdas wants to merge 19 commits intodevfrom
feat/SOF-7827
Open

SOF-7827: introduce applications schema with build config#388
pranabdas wants to merge 19 commits intodevfrom
feat/SOF-7827

Conversation

@pranabdas
Copy link
Member

No description provided.

"type": "object"
}
},
"application": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be needed

}
},
"application": {
"description": "information about the simulation engine/application.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information about the "main application" used for categorization purposes

addFormats(ajvValidatorAndCleaner);
addFormats(ajvValidatorAndCleanerNoDefaults);
addFormats(ajvValidatorAndCleanerWithCoercingTypes);
addFormats(ajvValidatorAndCleanerWithCoercingTypesNoDefaults);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k0stik to review the changes in this file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pranabdas, why may we not want to use schemas default values?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

"default": "2022.8.16"

"type": "object",
"$ref": "application/build_config.json"
},
"additionalProperties": true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
     },
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants