1
0
Fork 0

Converted to draft v4 schema

Editors such as Visual Studio leverages JSON Schema draft v4, but this schema was authored in the old draft v3. With just a few minor changes, the schema is now draft v4.

* Added `$schema` property to state it is using schema draft v4
* Changed `required` properties to arrays instead of strings. This is the only real difference from v3 to v4 in this schema
pull/3475/head
Mads Kristensen 2014-11-28 14:02:05 -08:00
parent b23a3cd368
commit acf3638762
1 changed files with 6 additions and 6 deletions

View File

@ -1,12 +1,13 @@
{ {
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "Package", "name": "Package",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"required": [ "name", "description" ],
"properties": { "properties": {
"name": { "name": {
"type": "string", "type": "string",
"description": "Package name, including 'vendor-name/' prefix.", "description": "Package name, including 'vendor-name/' prefix."
"required": true
}, },
"type": { "type": {
"description": "Package type, either 'library' for common packages, 'composer-plugin' for plugins, 'metapackage' for empty packages, or a custom type ([a-z0-9-]+) defined by whatever project this package applies to.", "description": "Package type, either 'library' for common packages, 'composer-plugin' for plugins, 'metapackage' for empty packages, or a custom type ([a-z0-9-]+) defined by whatever project this package applies to.",
@ -18,8 +19,7 @@
}, },
"description": { "description": {
"type": "string", "type": "string",
"description": "Short package description.", "description": "Short package description."
"required": true
}, },
"keywords": { "keywords": {
"type": "array", "type": "array",
@ -51,11 +51,11 @@
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"required": [ "name"],
"properties": { "properties": {
"name": { "name": {
"type": "string", "type": "string",
"description": "Full name of the author.", "description": "Full name of the author."
"required": true
}, },
"email": { "email": {
"type": "string", "type": "string",