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.
warn on property of type `object` with string value definition e.g: - key: value (object)
- Loading branch information
Jiri Kratochvil
committed
May 20, 2016
1 parent
aca5f3a
commit 7c1881e
Showing
5 changed files
with
267 additions
and
2 deletions.
There are no files selected for viewing
Submodule snowcrash
updated
2 files
+12 −0 | src/MSONValueMemberParser.cc | |
+14 −0 | test/test-MSONValueMemberParser.cc |
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,16 @@ | ||
# GET / | ||
- Response 200 (application/json) | ||
- Attribute (A) | ||
|
||
# Data Structures | ||
|
||
## O (object) | ||
|
||
## A | ||
- explicit: value (object) | ||
|
||
- implicit: value | ||
- key: value | ||
|
||
- named: value (O) | ||
|
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,248 @@ | ||
{ | ||
"_version": "2.2", | ||
"ast": { | ||
"_version": "4.0", | ||
"metadata": [], | ||
"name": "", | ||
"description": "", | ||
"element": "category", | ||
"resourceGroups": [ | ||
{ | ||
"name": "", | ||
"description": "", | ||
"resources": [ | ||
{ | ||
"element": "resource", | ||
"name": "", | ||
"description": "", | ||
"uriTemplate": "/", | ||
"model": {}, | ||
"parameters": [], | ||
"actions": [ | ||
{ | ||
"name": "", | ||
"description": "", | ||
"method": "GET", | ||
"parameters": [], | ||
"attributes": { | ||
"relation": "", | ||
"uriTemplate": "" | ||
}, | ||
"content": [], | ||
"examples": [ | ||
{ | ||
"name": "", | ||
"description": "", | ||
"requests": [], | ||
"responses": [ | ||
{ | ||
"name": "200", | ||
"description": "", | ||
"headers": [ | ||
{ | ||
"name": "Content-Type", | ||
"value": "application/json" | ||
} | ||
], | ||
"body": "{\n \"explicit\": {},\n \"implicit\": {\n \"key\": \"value\"\n },\n \"named\": {}\n}", | ||
"schema": "{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"explicit\": {\n \"type\": \"object\",\n \"properties\": {}\n },\n \"implicit\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n }\n }\n },\n \"named\": {\n \"type\": \"object\",\n \"properties\": {}\n }\n }\n}", | ||
"content": [ | ||
{ | ||
"element": "dataStructure", | ||
"content": [ | ||
{ | ||
"element": "A" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"content": [] | ||
} | ||
] | ||
} | ||
], | ||
"content": [ | ||
{ | ||
"element": "category", | ||
"content": [ | ||
{ | ||
"element": "resource", | ||
"name": "", | ||
"description": "", | ||
"uriTemplate": "/", | ||
"model": {}, | ||
"parameters": [], | ||
"actions": [ | ||
{ | ||
"name": "", | ||
"description": "", | ||
"method": "GET", | ||
"parameters": [], | ||
"attributes": { | ||
"relation": "", | ||
"uriTemplate": "" | ||
}, | ||
"content": [], | ||
"examples": [ | ||
{ | ||
"name": "", | ||
"description": "", | ||
"requests": [], | ||
"responses": [ | ||
{ | ||
"name": "200", | ||
"description": "", | ||
"headers": [ | ||
{ | ||
"name": "Content-Type", | ||
"value": "application/json" | ||
} | ||
], | ||
"body": "{\n \"explicit\": {},\n \"implicit\": {\n \"key\": \"value\"\n },\n \"named\": {}\n}", | ||
"schema": "{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"explicit\": {\n \"type\": \"object\",\n \"properties\": {}\n },\n \"implicit\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n }\n }\n },\n \"named\": {\n \"type\": \"object\",\n \"properties\": {}\n }\n }\n}", | ||
"content": [ | ||
{ | ||
"element": "dataStructure", | ||
"content": [ | ||
{ | ||
"element": "A" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"content": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"element": "category", | ||
"content": [ | ||
{ | ||
"element": "dataStructure", | ||
"content": [ | ||
{ | ||
"element": "object", | ||
"meta": { | ||
"id": "O" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"element": "dataStructure", | ||
"content": [ | ||
{ | ||
"element": "object", | ||
"meta": { | ||
"id": "A" | ||
}, | ||
"content": [ | ||
{ | ||
"element": "member", | ||
"content": { | ||
"key": { | ||
"element": "string", | ||
"content": "explicit" | ||
}, | ||
"value": { | ||
"element": "object" | ||
} | ||
} | ||
}, | ||
{ | ||
"element": "member", | ||
"content": { | ||
"key": { | ||
"element": "string", | ||
"content": "implicit" | ||
}, | ||
"value": { | ||
"element": "object", | ||
"content": [ | ||
{ | ||
"element": "member", | ||
"content": { | ||
"key": { | ||
"element": "string", | ||
"content": "key" | ||
}, | ||
"value": { | ||
"element": "string", | ||
"content": "value" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"element": "member", | ||
"content": { | ||
"key": { | ||
"element": "string", | ||
"content": "named" | ||
}, | ||
"value": { | ||
"element": "O" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"error": { | ||
"code": 0, | ||
"message": "", | ||
"location": [] | ||
}, | ||
"warnings": [ | ||
{ | ||
"code": 8, | ||
"message": "'object' with value definition. You should use type definition without value eg. '- key (object)'", | ||
"location": [ | ||
{ | ||
"index": 102, | ||
"length": 28 | ||
} | ||
] | ||
}, | ||
{ | ||
"code": 8, | ||
"message": "'object' with value definition. You should use type definition without value eg. '- key (object)'", | ||
"location": [ | ||
{ | ||
"index": 130, | ||
"length": 36 | ||
} | ||
] | ||
}, | ||
{ | ||
"code": 8, | ||
"message": "'object' with value definition. You should use type definition without value eg. '- key (object)'", | ||
"location": [ | ||
{ | ||
"index": 166, | ||
"length": 20 | ||
} | ||
] | ||
} | ||
] | ||
} |
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