Proposal: supporting array of strings for "description" annotation #461
Replies: 3 comments
-
This has come up before. I think the resolution was that this is a JSON problem and not a JSON Schema problem. JSON Schema doesn't have to be written in JSON, it just needs to be written in something that's compatible with JSON. So, the recommendation is to use some other format that's more suitable for humans such as YAML or JSON5 for schema development. |
Beta Was this translation helpful? Give feedback.
-
This is unfortunate as many JSON schemas are described using JSON. |
Beta Was this translation helpful? Give feedback.
-
I might add that the requirement for the "description" annotation to be a string is clearly (well, at least to me) a JSON schema specification (in the schema for a JSON schema written using JSON). It should be easy to accept either a string or an array of strings, which would acceede to teh request, while remaining valid JSON. (It would be viewed as "syntactic sugar" for coders of JSON schemas.) |
Beta Was this translation helpful? Give feedback.
-
Currently, only simple strings are permitted for "description" annotations.
Given that JSON does not support string continuation, long descriptions can be difficult to read, update, and otherwise manage in an IDE while updating a JSON schema.
Has the ability to instead support both a string or an array of strings been considered?
Something like the following would be useful:
Even when such a description is rendered by, say, a browser, having the paragraphs in the description or separate lines implemented in the manner shown above would make the text much more readable and would provide the ability to do things, like providing example as per below:
Beta Was this translation helpful? Give feedback.
All reactions