-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add version
property to Explicitly Version JSON Schemas like XML Schemas
#920
Comments
There is no standard explicit meta-property like |
This is related to #902. It would be great to have a target design of what the JSON Schema property set looks like at the top. TMK we have not addressed this at all systematically. Both properties such as Both these issues should be tied to ongoing work in the Metaschema pipelines. Maybe we need a tracker issue. |
SDF (https://datatracker.ietf.org/doc/draft-ietf-asdf-sdf/) has a "version" keyword:
There is value in having both a unique name of a document containing 2 or 3 levels of semver and a sequence number within that unique name. I agree with adding a |
Given that "$version" and "version" are not keywords recognized by JSON Schema 07, I don't think we can add either property to the schema. Adding this will cause all kinds of mischief with various JSON schema validators. I think we need to consider adding the version to "$id". Maybe something like:
Can we live with this? |
Sorry I never responded to this, let alone brought it up in today's model meeting (despite opening the issue). This "seems ok to me" but I relayed this feedback based on feedback from others I met in the user community for their particular use case. I will follow up and ask what their thoughts are on this topic. |
It "seems OK" to me too, but 1) I'd like to know if any JSON Schema validators reject a
is treated as a different package, leading to either an explosion of unresolved references or ineffective patch attempts. |
@davaya @david-waltermire-nist as to (1) I can confirm that ajv does not like As to (2) maybe we should consider using only the major version increment in the JSON Schema ID?
for any |
@davaya Sorting out the JSON schema id will need to be handled programmatically. I wish I had a better answer. |
User Story:
As an OSCAL tool developer, I would like the JSON Schema to add an additional
version
attribute in the schema prelude.Goals:
Like the OSCAL XML Schemas, it is useful to version the schema itself so tooling can introspect a component/SSP/SAP/SAR/POA&M model and the tooling knows a particular version it is processing to properly process and prevent conflicts between breaking changes for one or more data model schemas.
Example from the XML Schema: https://github.com/usnistgov/OSCAL/blob/master/xml/schema/oscal_component_schema.xsd#L8
Counter-example from current JSON Schema: https://github.com/usnistgov/OSCAL/blob/master/json/schema/oscal_component_schema.json#L2-L5
Ongoing discussion in the following Gitter thread: https://gitter.im/usnistgov-OSCAL/Lobby?at=6090340dff705616c76dde40
Dependencies:
None that I am aware of this time.
Acceptance Criteria
{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}
The text was updated successfully, but these errors were encountered: