You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Order of the fields in tooling that consumes go-oscal was mentioned as a point of confusion for the generation of artifacts. Would like to test if it is possible to define ordered structs for the top level models.
Describe the solution you'd like
Given Generation of a model
When a new model is written to a file
Then the order of the model fields is deterministic and ordered as intended
Describe alternatives you've considered
non-critical change
Additional context
Establish some error checking to ensure we capture drift when model is updated with new or different fields.
The text was updated successfully, but these errors were encountered:
Current Discovery - establishing struct key order for fields requires additional input data or hard-coded values.
hard-coding the order is not scalable and introduces a lot of potential for drift and additional work on each release and update of OSCAL schemas.
The JSON schema - for which go-oscal uses to-date has no precedence towards the order of keys (and the order which specified in the schema is not the preferred order).
Using the XSD with the JSON schema provided an option towards fully-generated types with keys ordered - but the differences between the XML schema and the JSON schema presented issues with regards to natively supporting both.
At this time I believe integrating further complexity for generate and the inclusion of XSD to not be aligned with greater library support of XML as a first-class format. As such we should defer this for review in work done in #12 .
Is your feature request related to a problem? Please describe.
Order of the fields in tooling that consumes go-oscal was mentioned as a point of confusion for the generation of artifacts. Would like to test if it is possible to define ordered structs for the top level models.
Describe the solution you'd like
Describe alternatives you've considered
non-critical change
Additional context
Establish some error checking to ensure we capture drift when model is updated with new or different fields.
The text was updated successfully, but these errors were encountered: