summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler/test/enums.json
diff options
context:
space:
mode:
Diffstat (limited to 'tools/json_schema_compiler/test/enums.json')
-rw-r--r--tools/json_schema_compiler/test/enums.json50
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/json_schema_compiler/test/enums.json b/tools/json_schema_compiler/test/enums.json
index ae6be004..48c2c980 100644
--- a/tools/json_schema_compiler/test/enums.json
+++ b/tools/json_schema_compiler/test/enums.json
@@ -3,6 +3,10 @@
"namespace": "enums",
"types": [
{
+ "id": "Enumeration",
+ "enum": ["none", "one", "two", "three"]
+ },
+ {
"id": "EnumType",
"type": "object",
"properties": {
@@ -13,6 +17,19 @@
}
},
{
+ "id": "HasEnumeration",
+ "type": "object",
+ "properties": {
+ "enumeration": {
+ "$ref": "Enumeration"
+ },
+ "optional_enumeration": {
+ "$ref": "Enumeration",
+ "optional": true
+ }
+ }
+ },
+ {
"id": "OptionalEnumType",
"type": "object",
"properties": {
@@ -43,6 +60,22 @@
]
},
{
+ "name": "takesEnumAsType",
+ "type": "function",
+ "description": "Takes an enum type as its parameter.",
+ "parameters": [
+ {
+ "name": "enumeration",
+ "$ref": "Enumeration"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": []
+ }
+ ]
+ },
+ {
"name": "returnsEnum",
"type": "function",
"description": "Returns an enum through the callback",
@@ -61,6 +94,23 @@
]
},
{
+ "name": "returnsEnumAsType",
+ "type": "function",
+ "description": "Returns an enum through the callback",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "enumeration",
+ "$ref": "Enumeration"
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "returnsTwoEnums",
"type": "function",
"description": "Returns two enums through the callback",