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

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

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/enums.json
diff --git a/tools/json_schema_compiler/test/enums.json b/tools/json_schema_compiler/test/enums.json
index c776313627a08d29c31e84e0aa1e5ba80f7bb2d9..97237677a78d66329655cba32086e9f2eb2f2328 100644
--- a/tools/json_schema_compiler/test/enums.json
+++ b/tools/json_schema_compiler/test/enums.json
@@ -9,12 +9,16 @@
"enum": ["one", "two", "three"]
},
{
+ "id": "OtherEnumeration",
+ "type": "string",
+ "enum": ["spam", "ham", "eggs"]
+ },
+ {
"id": "EnumType",
"type": "object",
"properties": {
"type": {
- "type": "string",
- "enum": ["one", "two", "three"]
+ "$ref": "Enumeration"
}
}
},
@@ -32,13 +36,9 @@
}
},
{
- "id": "InlineAndReferenceEnum",
+ "id": "ReferenceEnum",
"type": "object",
"properties": {
- "inline_enum": {
- "type": "string",
- "enum": ["test1", "test2", "test3"]
- },
"reference_enum": {
"$ref": "Enumeration"
}
@@ -49,8 +49,7 @@
"type": "object",
"properties": {
"type": {
- "type": "string",
- "enum": ["one", "two", "three"],
+ "$ref": "Enumeration",
"optional": true
}
}
@@ -64,8 +63,7 @@
"parameters": [
{
"name": "state",
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "Enumeration"
},
{
"name": "callback",
@@ -83,8 +81,7 @@
"name": "values",
"type": "array",
"items": {
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "Enumeration"
}
},
{
@@ -140,8 +137,7 @@
"parameters": [
{
"name": "state",
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "Enumeration"
}
]
}
@@ -175,13 +171,11 @@
"parameters": [
{
"name": "firstState",
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "Enumeration"
},
{
"name": "secondState",
- "type": "string",
- "enum": ["spam", "ham", "eggs"]
+ "$ref": "OtherEnumeration"
}
]
}
@@ -194,8 +188,7 @@
"parameters": [
{
"name": "state",
- "type": "string",
- "enum": ["foo", "bar", "baz"],
+ "$ref": "Enumeration",
"optional": true
},
{
@@ -212,14 +205,12 @@
"parameters": [
{
"name": "state",
- "type": "string",
- "enum": ["foo", "bar", "baz"],
+ "$ref": "Enumeration",
"optional": true
},
{
"name": "type",
- "type": "string",
- "enum": ["foo", "ding", "dong"],
+ "$ref": "OtherEnumeration",
"optional": true
},
{
@@ -238,8 +229,7 @@
"parameters": [
{
"name": "someEnum",
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "Enumeration"
}
]
},
@@ -250,13 +240,11 @@
"parameters": [
{
"name": "firstEnum",
- "type": "string",
- "enum": ["foo", "bar", "baz"]
+ "$ref": "Enumeration"
},
{
"name": "secondEnum",
- "type": "string",
- "enum": ["spam", "ham", "eggs"]
+ "$ref": "OtherEnumeration"
}
]
}

Powered by Google App Engine
This is Rietveld 408576698