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
When generating OpenAPI3 specs that make developers happy
Classes should be Upper Camel Case (eg Application)
properties should be Lower Camel Case (eg status property of Application)
this includes properties which are associations (eg the association between VisaApplication and TravelCompanion classes should be named travelCompanion)
since models may be imported from other sources (eg UN RDMs) that may have different conventions, it would be a terribly time consuming task to go through 100's of properties to change cases to suit the output. instead these rules should be encoded as NDR (naming and design rules) when generating OpenAPI and JSON-LD:
Always change class names to UCC (so remove any spaces / hyphens / undersocres and capitalise the first letter of each word in the class name)
always change property names to LCC (so (so remove any spaces / hyphens / undersocres and capitalise the first letter of any words after first in the property name)
if a relationship (eg aggregation or composition) has a name then make sure it is changed to LCC like properties
if a relationship (eg aggregation or composition) does not have the name then use the name of the target class but make sure to make it LCC (as target class will be UCC). In this way the relationship will appear as a LCC property of the source class.
In most cases the modeler will want to apply these rules but in some cases the modeller may prefer to use names excactly as in the model. therefore this should be a configurable option - as a checkbox (default checked) to apply JSON NDR.
The text was updated successfully, but these errors were encountered:
Then there's the composite ones which we can setup as objects with attributes - so the mapping to simple JSON type is at the property of data type level rather than property of RDM class level.
Amount should be modelled as a class with value (numeric) and currency (string) properties
Measure should be modelled as a class with value (numeric) and uom (string) properties
And then there's the non-text binary types which should probably map to JSON contentMedia type like
When generating OpenAPI3 specs that make developers happy
since models may be imported from other sources (eg UN RDMs) that may have different conventions, it would be a terribly time consuming task to go through 100's of properties to change cases to suit the output. instead these rules should be encoded as NDR (naming and design rules) when generating OpenAPI and JSON-LD:
In most cases the modeler will want to apply these rules but in some cases the modeller may prefer to use names excactly as in the model. therefore this should be a configurable option - as a checkbox (default checked) to apply JSON NDR.
The text was updated successfully, but these errors were encountered: