-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Is this supposed to be a string or a JSON value? #3289
Comments
@jeremyfiel didn't this come up in one of our Slack discussions? |
I believe we did have some discussion on it but can't find anything at the moment. The |
This line is the exact same keyword, but this is parsed as an object, not a string. Why is there a difference? (I suppose I should have mentioned this comparison at first.) |
@jeremyfiel The
There is nothing to stop someone representing a JSON or YAML as a string also. A consumer would have to do some reconciliation between the expected datatype of the parameter/content and the data type of the example value. |
I would say that text implies that JSON/YAML should not be embedded in a string. I understand that it's not a hard requirement, but the implication seems quite apparent to me. |
This is answered here: and that issue is in the 3.0.4 milestone to be clarified. Closing this as a duplicate. |
OpenAPI-Specification/examples/v3.0/api-with-examples.yaml
Line 52 in 9dff244
The YAML here yields a multiline string, but the other
value
s use a JSON value. Was the string a mistake?I note that in the corresponding
.json
file, it's also an encoded string, so it's probably correct. Why would this be?The text was updated successfully, but these errors were encountered: