Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: tools/json_schema_compiler/test/objects.json

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/json_schema_compiler/test/objects.json
diff --git a/tools/json_schema_compiler/test/objects.json b/tools/json_schema_compiler/test/objects.json
index e76e229900a1938dc710fa3af1a8a77c846007aa..dd0bb2072049303f8a8a61ccb64816f72527f02b 100644
--- a/tools/json_schema_compiler/test/objects.json
+++ b/tools/json_schema_compiler/test/objects.json
@@ -2,7 +2,18 @@
{
"namespace": "objects",
"description": "The objects API.",
- "types": [],
+ "types": [
+ {
+ "id": "firstState",
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ },
+ {
+ "id": "secondState",
+ "type": "string",
+ "enum": ["spam", "ham", "eggs"]
+ }
+ ],
"functions": [
{
"name": "objectParam",
@@ -46,8 +57,7 @@
"type": "object",
"properties": {
"state": {
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "firstState"
}
}
}
@@ -69,8 +79,7 @@
"type": "object",
"properties": {
"state": {
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "firstState"
}
}
},
@@ -79,8 +88,7 @@
"type": "object",
"properties": {
"state": {
- "type": "string",
- "enum": ["spam", "ham", "eggs"]
+ "$ref": "secondState"
}
}
}
@@ -100,8 +108,7 @@
"type": "object",
"properties": {
"state": {
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "firstState"
}
}
}
@@ -117,8 +124,7 @@
"type": "object",
"properties": {
"state": {
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "firstState"
}
}
},
@@ -127,8 +133,7 @@
"type": "object",
"properties": {
"state": {
- "type": "string",
- "enum": ["spam", "ham", "eggs"]
+ "$ref": "secondState"
}
}
}
« no previous file with comments | « tools/json_schema_compiler/test/enums_unittest.cc ('k') | tools/json_schema_compiler/test/objects_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698