We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
"
Given the following API Blueprint, with an MSON property href":
href"
# API Name ## GET / + Response 200 (application/json) + Attributes + `href"`
The final parse result contains a JSON String:
"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"href\"\": {\n \"type\": \"string\"\n }\n }\n}"
Note the " is not correctly escaped (\"href\"\") it should be escaped an extra time inside the key quotes.
\"href\"\"
$ ./bin/drafter dd.apib -f json | jq .content[0].content[0].content[0].content[0].content[1].content[2].content "{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"href\"\": {\n \"type\": \"string\"\n }\n }\n}" $ ./bin/drafter dd.apib -f json | jq .content[0].content[0].content[0].content[0].content[1].content[2].content -r { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "href"": { "type": "string" } } } $ ./bin/drafter dd.apib -f json | jq .content[0].content[0].content[0].content[0].content[1].content[2].content -r | jq parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 6, column 7
The text was updated successfully, but these errors were encountered:
(fix): issue #719 - escaping keys in generated JSON/JSON Schema
8733c07
Merge pull request #721 from apiaryio/klokane/issue-719
a9c2404
Successfully merging a pull request may close this issue.
Given the following API Blueprint, with an MSON property
href"
:The final parse result contains a JSON String:
"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"href\"\": {\n \"type\": \"string\"\n }\n }\n}"
Note the
"
is not correctly escaped (\"href\"\"
) it should be escaped an extra time inside the key quotes.The text was updated successfully, but these errors were encountered: