1
0
Fork 0

Merge pull request #5752 from alcohol/amend-composer-repository-schema

changes based on feedback from @stof in #5739
pull/5779/head
Jordi Boggiano 2016-10-10 14:05:22 +02:00 committed by GitHub
commit af519de0de
1 changed files with 32 additions and 21 deletions

View File

@ -49,11 +49,11 @@
"version": { "version": {
"type": "object", "type": "object",
"oneOf": [ "oneOf": [
{ "$ref": "#/definitions/package-generic" }, { "$ref": "#/definitions/package" },
{ "$ref": "#/definitions/package-metapackage" } { "$ref": "#/definitions/metapackage" }
] ]
}, },
"package-generic": { "package-base": {
"properties": { "properties": {
"name": { "type": "string" }, "name": { "type": "string" },
"type": { "type": "string" }, "type": { "type": "string" },
@ -62,29 +62,40 @@
"type": "string", "type": "string",
"description": "Normalized version, optional but can save computational time on client side." "description": "Normalized version, optional but can save computational time on client side."
}, },
"source": { "type": "object" }, "autoload": { "type": "object" },
"dist": { "type": "object" }, "require": { "type": "object" },
"replace": { "type": "object" },
"conflict": { "type": "object" },
"provide": { "type": "object" },
"time": { "type": "string" } "time": { "type": "string" }
}, },
"oneOf": [ "additionalProperties": true
},
"package": {
"allOf": [
{ "$ref": "#/definitions/package-base" },
{
"properties": {
"dist": { "type": "object" },
"source": { "type": "object" }
}
},
{ "oneOf": [
{ "required": [ "name", "version", "source" ] }, { "required": [ "name", "version", "source" ] },
{ "required": [ "name", "version", "dist" ] } { "required": [ "name", "version", "dist" ] }
], ] }
"additionalProperties": true ]
}, },
"package-metapackage": { "metapackage": {
"allOf": [
{ "$ref": "#/definitions/package-base" },
{
"properties": { "properties": {
"name": { "type": "string" }, "type": { "type": "string", "enum": [ "metapackage" ] }
"type": { "type": "string", "enum": [ "metapackage" ] },
"version": { "type": "string" },
"version_normalized": {
"type": "string",
"description": "Normalized version, optional but can save computational time on client side."
}, },
"time": { "type": "string" } "required": [ "name", "version", "type" ]
}, }
"required": [ "name", "version" ], ]
"additionalProperties": true
}, },
"provider": { "provider": {
"type": "object", "type": "object",