-
-
Notifications
You must be signed in to change notification settings - Fork 311
Consider allowing description (and $comment) to be an array of strings #875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mewalig The JSON Schema organization is not actively working on further vocabularies at this time, but that repository serves as a reference for keyword proposals that might be of interest to anyone building such vocabularies. |
@liquidaty I'm a little confused on what just happened with email notifications and issues. You mentioned You are welcome to file this in the vocabularies repo, so I'm not sure why you closed it there. |
Please consider allowing a
description
to be an array of strings.The utility of this alternative representation is hopefully self-evident. In any case, an example of this idea in practice is https://pypi.org/project/sphinx-jsonschema/, which supports description arrays through an alternative keyword (
$$description
) (so there's at least one other person out there who would seem to find a use for this if it was in the spec...).For example, using the default example at https://editor.swagger.io/:
yaml:
As converted to JSON Schema:
Notice that the description is a 293-character line with embedded
\n
chars.Under the proposed approach, this could equivalently be written as:
This proposed change would also apply to
$comment
and/or any other JSON Schema string types that are intended to capture arbitrary-length and potentially multi-line strings.Seems like this would be an easy spec change that doesn't have much downside. Thoughts?
The text was updated successfully, but these errors were encountered: