Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
feat: use $ref: #resources in JSON Schmea
Browse files Browse the repository at this point in the history
  • Loading branch information
teppeis committed Apr 7, 2017
1 parent b778604 commit e5c930d
Showing 1 changed file with 24 additions and 47 deletions.
71 changes: 24 additions & 47 deletions manifest-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"type": "string",
"description": "internal only",
"minLength": 1,
"format": "uri"
"format": "relative-path"
},
"homepage_url": {
"type": "object",
Expand All @@ -91,43 +91,18 @@
"type": "object",
"properties": {
"js": {
"type": "array",
"uniqueItems": true,
"items": {
"description": "internal or external",
"type": "string",
"anyOf": [{
"format": "https-url"
}, {
"format": "relative-path"
}],
"maxItems": 30
}
"$ref": "#resources"
},
"css": {
"type": "array",
"uniqueItems": true,
"items": {
"description": "internal or external",
"type": "string",
"format": "uri",
"maxItems": 30
}
"$ref": "#resources"
}
}
},
"mobile": {
"type": "object",
"properties": {
"js": {
"type": "array",
"uniqueItems": true,
"items": {
"description": "internal or external",
"type": "string",
"format": "uri",
"maxItems": 30
}
"$ref": "#resources"
}
}
},
Expand All @@ -137,28 +112,14 @@
"html": {
"description": "internal only",
"type": "string",
"format": "uri",
"format": "relative-path",
"minLength": 1
},
"js": {
"type": "array",
"uniqueItems": true,
"items": {
"description": "internal or external",
"type": "string",
"format": "uri",
"maxItems": 30
}
"$ref": "#resources"
},
"css": {
"type": "array",
"uniqueItems": true,
"items": {
"description": "internal or external",
"type": "string",
"format": "uri",
"maxItems": 30
}
"$ref": "#resources"
},
"required_params": {
"type": "array",
Expand All @@ -177,5 +138,21 @@
"type",
"name",
"icon"
]
],
"definitions": {
"resources": {
"id": "#resources",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"anyOf": [{
"format": "https-url"
}, {
"format": "relative-path"
}],
"maxItems": 30
}
}
}
}

0 comments on commit e5c930d

Please sign in to comment.