Open krzysztof opened 6 years ago
One inconsistency with the naming, lowercase identifier
here:
https://github.com/scholix/schema/blob/master/json/v3/schema.json#L35
vs Identifier
here and in many other places: https://github.com/scholix/schema/blob/master/json/v3/schema.json#L145
Was this in any way intentional? Can this be unified?
It looks like they only non UpperCamelCase properties are:
"LinkProvider/name" https://github.com/scholix/schema/blob/master/json/v3/schema.json#L323 and "LinkProvider/identifier": https://github.com/scholix/schema/blob/master/json/v3/schema.json#L35
I guess the easiest would be to just upcase those two.
This PR should contain a schema with a UpperCase consistent names: https://github.com/scholix/schema/pull/7
It looks right now that the JSON schema uses a mix of lowerCamelCase/UpperCamelCase styles for the JSON schemas: https://github.com/scholix/schema/blob/master/json/v3/schema.json I guess this comes as a direct translation from XML's
ElementNames
andpropertyNames
, which are Upper/lower case respectively. To the best of my knowledge, this is not a very popular choice for JSON Schemas and REST APIs, and perhaps JSON schema should not follow the XML that close when it comes to property name style convention? The variable names, when named carefully, can be mapped from one casing to another deterministicly, so the documentation should not be a problem.See discussion on JSON naming at: https://stackoverflow.com/questions/5543490/json-naming-convention. Two most common styles are:
snake_case
lowerCamelCase
UpperCamelCase