1
0
Fork 0

Update composer.json schema

pull/120/merge
Jordi Boggiano 2011-11-20 16:23:22 +01:00
parent 8df2436be8
commit 17e9694317
1 changed files with 40 additions and 38 deletions

View File

@ -5,119 +5,121 @@
"properties": { "properties": {
"name": { "name": {
"type": "string", "type": "string",
"description": "Package name, including type prefix if it's a plugin", "description": "Package name, including 'vendor-name/' prefix.",
"required": true "required": true
}, },
"type": { "type": {
"description": "Package type, either 'Library', or the parent project it applies to if it's a plugin for a framework or application (e.g. 'Symfony2', 'Typo3', 'Drupal', ..), note that this has to be defined and communicated by any project implementing a custom composer installer, those are just unreliable examples.", "description": "Package type, either 'library' for common packages, 'composer-installer' for custom installers, or a custom type defined by whatever project this package applies to.",
"type": "string", "type": "string"
"optional": true
}, },
"target-dir": { "target-dir": {
"description": "Override install location of package", "description": "Forces the package to be installed into the given subdirectory path. This is used for autoloading PSR-0 packages that do not contain their full path. Use forward slashes for cross-platform compatibility.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"type": "string", "type": "string",
"description": "Package description", "description": "Short package description.",
"required": true "required": true
}, },
"keywords": { "keywords": {
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string",
}, "description": "A tag/keyword that this package relates to."
"optional": true }
}, },
"homepage": { "homepage": {
"type": "string", "type": "string",
"description": "Homepage URL for the project", "description": "Homepage URL for the project.",
"format": "uri", "format": "uri"
"optional": true
}, },
"version": { "version": {
"type": "string", "type": "string",
"description": "Package version, see http://packagist.org/about for more info on valid schemes", "description": "Package version, see http://packagist.org/about for more info on valid schemes.",
"required": true "required": true
}, },
"time": {
"type": "string",
"description": "Package release date, in 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' format."
},
"license": { "license": {
"type": ["string", "array"], "type": ["string", "array"],
"description": "License name", "description": "License name. Or an array of license names."
"optional": true
}, },
"authors": { "authors": {
"type": "array", "type": "array",
"description": "List of authors that contributed to the package. This is typically the main maintainers, not the full list.",
"items": { "items": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"name": { "name": {
"type": "string", "type": "string",
"description": "Full name of the author", "description": "Full name of the author.",
"required": true "required": true
}, },
"email": { "email": {
"type": "string", "type": "string",
"description": "Email address of the author", "description": "Email address of the author.",
"format": "email", "format": "email"
"required": true
}, },
"homepage": { "homepage": {
"type": "string", "type": "string",
"description": "Homepage URL for the author", "description": "Homepage URL for the author.",
"format": "uri", "format": "uri"
"optional": true
} }
} }
}, }
"optional": true
}, },
"require": { "require": {
"type": "object", "type": "object",
"additionalProperties": true, "description": "This is a hash of package name (keys) and version constraints (values) that are required to run this package.",
"optional": true "additionalProperties": true
}, },
"replace": { "replace": {
"type": "object", "type": "object",
"additionalProperties": true, "description": "This is a hash of package name (keys) and version constraints (values) that can be replaced by this package.",
"optional": true "additionalProperties": true
}, },
"conflict": { "conflict": {
"type": "object", "type": "object",
"additionalProperties": true, "description": "This is a hash of package name (keys) and version constraints (values) that conflict with this package.",
"optional": true "additionalProperties": true
}, },
"provide": { "provide": {
"type": "object", "type": "object",
"additionalProperties": true, "description": "This is a hash of package name (keys) and version constraints (values) that this package provides in addition to this package's name.",
"optional": true "additionalProperties": true
}, },
"recommend": { "recommend": {
"type": "object", "type": "object",
"additionalProperties": true, "description": "This is a hash of package name (keys) and version constraints (values) that this package recommends to be installed (typically this will be installed as well).",
"optional": true "additionalProperties": true
}, },
"suggest": { "suggest": {
"type": "object", "type": "object",
"additionalProperties": true, "description": "This is a hash of package name (keys) and version constraints (values) that this package suggests work well with it (typically this will only be suggested to the user).",
"optional": true "additionalProperties": true
}, },
"extra": { "extra": {
"type": ["object", "array"], "type": ["object", "array"],
"additionalProperties": true, "description": "Arbitrary extra data that can be used by custom installers, for example, package of type composer-installer must have a 'class' key defining the installer class name.",
"optional": true "additionalProperties": true
}, },
"autoload": { "autoload": {
"type": "object", "type": "object",
"description": "Description of how the package can be autoloaded.",
"properties": { "properties": {
"psr-0": { "psr-0": {
"type": "object", "type": "object",
"description": "This is a hash of namespaces (keys) and the directories they can be found into (values) by the autoloader.",
"additionalProperties": true "additionalProperties": true
} }
} }
}, },
"repositories": { "repositories": {
"type": ["object", "array"], "type": ["object", "array"],
"description": "A set of additional repositories where packages can be found.",
"additionalProperties": true "additionalProperties": true
} }
} }