composer-schema-lax.json 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. {
  2. "name": "Package",
  3. "type": "object",
  4. "additionalProperties": true,
  5. "properties": {
  6. "name": {
  7. "type": "string",
  8. "description": "Package name, including 'vendor-name/' prefix."
  9. },
  10. "type": {
  11. "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.",
  12. "type": "string"
  13. },
  14. "target-dir": {
  15. "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.",
  16. "type": "string"
  17. },
  18. "description": {
  19. "type": "string",
  20. "description": "Short package description."
  21. },
  22. "keywords": {
  23. "type": "array",
  24. "items": {
  25. "type": "string",
  26. "description": "A tag/keyword that this package relates to."
  27. }
  28. },
  29. "homepage": {
  30. "type": "string",
  31. "description": "Homepage URL for the project.",
  32. "format": "uri"
  33. },
  34. "version": {
  35. "type": "string",
  36. "description": "Package version, see http://packagist.org/about for more info on valid schemes."
  37. },
  38. "time": {
  39. "type": "string",
  40. "description": "Package release date, in 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' format."
  41. },
  42. "license": {
  43. "type": ["string", "array"],
  44. "description": "License name. Or an array of license names."
  45. },
  46. "authors": {
  47. "type": "array",
  48. "description": "List of authors that contributed to the package. This is typically the main maintainers, not the full list.",
  49. "items": {
  50. "type": "object",
  51. "additionalProperties": false,
  52. "properties": {
  53. "name": {
  54. "type": "string",
  55. "description": "Full name of the author.",
  56. "required": true
  57. },
  58. "email": {
  59. "type": "string",
  60. "description": "Email address of the author.",
  61. "format": "email"
  62. },
  63. "homepage": {
  64. "type": "string",
  65. "description": "Homepage URL for the author.",
  66. "format": "uri"
  67. }
  68. }
  69. }
  70. },
  71. "require": {
  72. "type": "object",
  73. "description": "This is a hash of package name (keys) and version constraints (values) that are required to run this package.",
  74. "additionalProperties": true
  75. },
  76. "replace": {
  77. "type": "object",
  78. "description": "This is a hash of package name (keys) and version constraints (values) that can be replaced by this package.",
  79. "additionalProperties": true
  80. },
  81. "conflict": {
  82. "type": "object",
  83. "description": "This is a hash of package name (keys) and version constraints (values) that conflict with this package.",
  84. "additionalProperties": true
  85. },
  86. "provide": {
  87. "type": "object",
  88. "description": "This is a hash of package name (keys) and version constraints (values) that this package provides in addition to this package's name.",
  89. "additionalProperties": true
  90. },
  91. "recommend": {
  92. "type": "object",
  93. "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).",
  94. "additionalProperties": true
  95. },
  96. "suggest": {
  97. "type": "object",
  98. "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).",
  99. "additionalProperties": true
  100. },
  101. "config": {
  102. "type": ["object"],
  103. "description": "Composer options.",
  104. "properties": {
  105. "vendor-dir": {
  106. "type": "string",
  107. "description": "The location where all packages are installed, defaults to \"vendor\"."
  108. },
  109. "bin-dir": {
  110. "type": "string",
  111. "description": "The location where all binaries are linked, defaults to \"vendor/bin\"."
  112. }
  113. }
  114. },
  115. "extra": {
  116. "type": ["object", "array"],
  117. "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.",
  118. "additionalProperties": true
  119. },
  120. "autoload": {
  121. "type": "object",
  122. "description": "Description of how the package can be autoloaded.",
  123. "properties": {
  124. "psr-0": {
  125. "type": "object",
  126. "description": "This is a hash of namespaces (keys) and the directories they can be found into (values) by the autoloader.",
  127. "additionalProperties": true
  128. }
  129. }
  130. },
  131. "repositories": {
  132. "type": ["object", "array"],
  133. "description": "A set of additional repositories where packages can be found.",
  134. "additionalProperties": true
  135. },
  136. "bin": {
  137. "type": ["array"],
  138. "description": "A set of files that should be treated as binaries and symlinked into bin-dir (from config).",
  139. "items": {
  140. "type": "string"
  141. }
  142. },
  143. "scripts": {
  144. "type": ["object"],
  145. "description": "Scripts listeners that will be executed before/after some events.",
  146. "properties": {
  147. "pre-install-cmd": {
  148. "type": ["array", "string"],
  149. "description": "Occurs before the install command is executed, contains one or more Class::method callables."
  150. },
  151. "post-install-cmd": {
  152. "type": ["array", "string"],
  153. "description": "Occurs after the install command is executed, contains one or more Class::method callables."
  154. },
  155. "pre-update-cmd": {
  156. "type": ["array", "string"],
  157. "description": "Occurs before the update command is executed, contains one or more Class::method callables."
  158. },
  159. "post-update-cmd": {
  160. "type": ["array", "string"],
  161. "description": "Occurs after the update command is executed, contains one or more Class::method callables."
  162. },
  163. "pre-package-install": {
  164. "type": ["array", "string"],
  165. "description": "Occurs before a package is installed, contains one or more Class::method callables."
  166. },
  167. "post-package-install": {
  168. "type": ["array", "string"],
  169. "description": "Occurs after a package is installed, contains one or more Class::method callables."
  170. },
  171. "pre-package-update": {
  172. "type": ["array", "string"],
  173. "description": "Occurs before a package is updated, contains one or more Class::method callables."
  174. },
  175. "post-package-update": {
  176. "type": ["array", "string"],
  177. "description": "Occurs after a package is updated, contains one or more Class::method callables."
  178. },
  179. "pre-package-uninstall": {
  180. "type": ["array", "string"],
  181. "description": "Occurs before a package has been uninstalled, contains one or more Class::method callables."
  182. },
  183. "post-package-uninstall": {
  184. "type": ["array", "string"],
  185. "description": "Occurs after a package has been uninstalled, contains one or more Class::method callables."
  186. }
  187. }
  188. }
  189. }
  190. }