This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #699 by skipping invalid One Of entries when translating MSON to API Elements. In the example in #699, the parser (snowcrash) should skip the invalid One Of even before it arrives in semantic analysis. Because we are planning a complete rewrite of our parser, this issue was fixed during semantic analysis (drafter).
- Loading branch information
Showing
4 changed files
with
225 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# GET / | ||
|
||
+ Request (application/json) | ||
+ Attributes | ||
+ One Of | ||
+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{ | ||
"element": "parseResult", | ||
"content": [ | ||
{ | ||
"element": "category", | ||
"meta": { | ||
"classes": { | ||
"element": "array", | ||
"content": [ | ||
{ | ||
"element": "string", | ||
"content": "api" | ||
} | ||
] | ||
}, | ||
"title": { | ||
"element": "string", | ||
"content": "" | ||
} | ||
}, | ||
"content": [ | ||
{ | ||
"element": "resource", | ||
"meta": { | ||
"title": { | ||
"element": "string", | ||
"content": "" | ||
} | ||
}, | ||
"attributes": { | ||
"href": { | ||
"element": "string", | ||
"content": "/" | ||
} | ||
}, | ||
"content": [ | ||
{ | ||
"element": "transition", | ||
"meta": { | ||
"title": { | ||
"element": "string", | ||
"content": "" | ||
} | ||
}, | ||
"content": [ | ||
{ | ||
"element": "httpTransaction", | ||
"content": [ | ||
{ | ||
"element": "httpRequest", | ||
"attributes": { | ||
"method": { | ||
"element": "string", | ||
"content": "GET" | ||
}, | ||
"headers": { | ||
"element": "httpHeaders", | ||
"content": [ | ||
{ | ||
"element": "member", | ||
"content": { | ||
"key": { | ||
"element": "string", | ||
"content": "Content-Type" | ||
}, | ||
"value": { | ||
"element": "string", | ||
"content": "application/json" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"content": [ | ||
{ | ||
"element": "dataStructure", | ||
"content": { | ||
"element": "object", | ||
"content": [ | ||
{ | ||
"element": "select", | ||
"content": [ | ||
{ | ||
"element": "option", | ||
"content": [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"element": "asset", | ||
"meta": { | ||
"classes": { | ||
"element": "array", | ||
"content": [ | ||
{ | ||
"element": "string", | ||
"content": "messageBody" | ||
} | ||
] | ||
} | ||
}, | ||
"attributes": { | ||
"contentType": { | ||
"element": "string", | ||
"content": "application/json" | ||
} | ||
}, | ||
"content": "{}" | ||
}, | ||
{ | ||
"element": "asset", | ||
"meta": { | ||
"classes": { | ||
"element": "array", | ||
"content": [ | ||
{ | ||
"element": "string", | ||
"content": "messageBodySchema" | ||
} | ||
] | ||
} | ||
}, | ||
"attributes": { | ||
"contentType": { | ||
"element": "string", | ||
"content": "application/schema+json" | ||
} | ||
}, | ||
"content": "{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"allOf\": [\n {\n \"oneOf\": [\n {}\n ]\n }\n ]\n}" | ||
} | ||
] | ||
}, | ||
{ | ||
"element": "httpResponse", | ||
"content": [] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"element": "annotation", | ||
"meta": { | ||
"classes": { | ||
"element": "array", | ||
"content": [ | ||
{ | ||
"element": "string", | ||
"content": "warning" | ||
} | ||
] | ||
} | ||
}, | ||
"attributes": { | ||
"code": { | ||
"element": "number", | ||
"content": 6 | ||
}, | ||
"sourceMap": { | ||
"element": "array", | ||
"content": [ | ||
{ | ||
"element": "sourceMap", | ||
"content": [ | ||
{ | ||
"element": "array", | ||
"content": [ | ||
{ | ||
"element": "number", | ||
"attributes": { | ||
"line": { | ||
"element": "number", | ||
"content": 1 | ||
}, | ||
"column": { | ||
"element": "number", | ||
"content": 1 | ||
} | ||
}, | ||
"content": 0 | ||
}, | ||
{ | ||
"element": "number", | ||
"attributes": { | ||
"line": { | ||
"element": "number", | ||
"content": 2 | ||
}, | ||
"column": { | ||
"element": "number", | ||
"content": 1 | ||
} | ||
}, | ||
"content": 9 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"content": "action is missing a response for a request" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters