Closed andylowry closed 6 years ago
Implemented in #125
As described in #125, defaulting a missing type to "String" was altered to retain existing default behavior (which I had forgotten about). Rules for a missing field type are now:
String
is used.
It's pretty annoying to constantly have to write stuff like this in the types specification:
The property key above is the field's
id
value, and is the default for it path within its containing object. Thename
should also have an intelligent default based on theid
, and settling onString
as the default would make things additionally concise.For name default, the following rules will apply:
Only the final component of the
id
value will be considered (where components are separated by slash characters). E.g. withcomponents/schemas
onlyschemas
will be considered when determining the defaultname
.If the field is a scalar, or if the
id
value does not end ins
, then the last component of theid
, with its first character upper-cased, is the defaultname
.Otherwise (collection or map field, and
id
ends ins
), the last component of theid
, with the first character upper-cased and the finals
removed, is the default name.