composer-schema.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {
  2. "name": "Package",
  3. "type": "object",
  4. "additionalProperties": false,
  5. "properties": {
  6. "name": {
  7. "type": "string",
  8. "description": "Package name, including 'vendor-name/' prefix.",
  9. "required": true
  10. },
  11. "type": {
  12. "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.",
  13. "type": "string"
  14. },
  15. "target-dir": {
  16. "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.",
  17. "type": "string"
  18. },
  19. "description": {
  20. "type": "string",
  21. "description": "Short package description.",
  22. "required": true
  23. },
  24. "keywords": {
  25. "type": "array",
  26. "items": {
  27. "type": "string",
  28. "description": "A tag/keyword that this package relates to."
  29. }
  30. },
  31. "homepage": {
  32. "type": "string",
  33. "description": "Homepage URL for the project.",
  34. "format": "uri"
  35. },
  36. "version": {
  37. "type": "string",
  38. "description": "Package version, see http://packagist.org/about for more info on valid schemes.",
  39. "required": true
  40. },
  41. "time": {
  42. "type": "string",
  43. "description": "Package release date, in 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' format."
  44. },
  45. "license": {
  46. "type": ["string", "array"],
  47. "description": "License name. Or an array of license names."
  48. },
  49. "authors": {
  50. "type": "array",
  51. "description": "List of authors that contributed to the package. This is typically the main maintainers, not the full list.",
  52. "items": {
  53. "type": "object",
  54. "additionalProperties": false,
  55. "properties": {
  56. "name": {
  57. "type": "string",
  58. "description": "Full name of the author.",
  59. "required": true
  60. },
  61. "email": {
  62. "type": "string",
  63. "description": "Email address of the author.",
  64. "format": "email"
  65. },
  66. "homepage": {
  67. "type": "string",
  68. "description": "Homepage URL for the author.",
  69. "format": "uri"
  70. }
  71. }
  72. }
  73. },
  74. "require": {
  75. "type": "object",
  76. "description": "This is a hash of package name (keys) and version constraints (values) that are required to run this package.",
  77. "additionalProperties": true
  78. },
  79. "replace": {
  80. "type": "object",
  81. "description": "This is a hash of package name (keys) and version constraints (values) that can be replaced by this package.",
  82. "additionalProperties": true
  83. },
  84. "conflict": {
  85. "type": "object",
  86. "description": "This is a hash of package name (keys) and version constraints (values) that conflict with this package.",
  87. "additionalProperties": true
  88. },
  89. "provide": {
  90. "type": "object",
  91. "description": "This is a hash of package name (keys) and version constraints (values) that this package provides in addition to this package's name.",
  92. "additionalProperties": true
  93. },
  94. "recommend": {
  95. "type": "object",
  96. "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).",
  97. "additionalProperties": true
  98. },
  99. "suggest": {
  100. "type": "object",
  101. "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).",
  102. "additionalProperties": true
  103. },
  104. "extra": {
  105. "type": ["object", "array"],
  106. "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.",
  107. "additionalProperties": true
  108. },
  109. "autoload": {
  110. "type": "object",
  111. "description": "Description of how the package can be autoloaded.",
  112. "properties": {
  113. "psr-0": {
  114. "type": "object",
  115. "description": "This is a hash of namespaces (keys) and the directories they can be found into (values) by the autoloader.",
  116. "additionalProperties": true
  117. }
  118. }
  119. },
  120. "repositories": {
  121. "type": ["object", "array"],
  122. "description": "A set of additional repositories where packages can be found.",
  123. "additionalProperties": true
  124. }
  125. }
  126. }