@tsed/schema 6.87.1 → 6.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (835) hide show
  1. package/lib/{components → cjs/components}/anyMapper.d.ts +0 -0
  2. package/lib/cjs/components/anyMapper.js +24 -0
  3. package/lib/cjs/components/anyMapper.js.map +1 -0
  4. package/lib/{components → cjs/components}/classMapper.d.ts +0 -0
  5. package/lib/cjs/components/classMapper.js +41 -0
  6. package/lib/cjs/components/classMapper.js.map +1 -0
  7. package/lib/{components → cjs/components}/genericsMapper.d.ts +0 -0
  8. package/lib/cjs/components/genericsMapper.js +62 -0
  9. package/lib/cjs/components/genericsMapper.js.map +1 -0
  10. package/lib/{components → cjs/components}/index.d.ts +0 -0
  11. package/lib/cjs/components/index.js +13 -0
  12. package/lib/cjs/components/index.js.map +1 -0
  13. package/lib/{components → cjs/components}/inheritedClassMapper.d.ts +0 -0
  14. package/lib/cjs/components/inheritedClassMapper.js +22 -0
  15. package/lib/cjs/components/inheritedClassMapper.js.map +1 -0
  16. package/lib/{components → cjs/components}/itemMapper.d.ts +0 -0
  17. package/lib/cjs/components/itemMapper.js +10 -0
  18. package/lib/cjs/components/itemMapper.js.map +1 -0
  19. package/lib/{components → cjs/components}/lazyRefMapper.d.ts +0 -0
  20. package/lib/cjs/components/lazyRefMapper.js +19 -0
  21. package/lib/cjs/components/lazyRefMapper.js.map +1 -0
  22. package/lib/{components → cjs/components}/mapMapper.d.ts +0 -0
  23. package/lib/cjs/components/mapMapper.js +25 -0
  24. package/lib/cjs/components/mapMapper.js.map +1 -0
  25. package/lib/{components → cjs/components}/objectMapper.d.ts +0 -0
  26. package/lib/cjs/components/objectMapper.js +25 -0
  27. package/lib/cjs/components/objectMapper.js.map +1 -0
  28. package/lib/{components → cjs/components}/schemaMapper.d.ts +0 -0
  29. package/lib/cjs/components/schemaMapper.js +100 -0
  30. package/lib/cjs/components/schemaMapper.js.map +1 -0
  31. package/lib/{constants → cjs/constants}/httpMethods.d.ts +0 -0
  32. package/lib/cjs/constants/httpMethods.js +46 -0
  33. package/lib/cjs/constants/httpMethods.js.map +1 -0
  34. package/lib/{constants → cjs/constants}/httpStatusMessages.d.ts +0 -0
  35. package/lib/cjs/constants/httpStatusMessages.js +110 -0
  36. package/lib/cjs/constants/httpStatusMessages.js.map +1 -0
  37. package/lib/{decorators → cjs/decorators}/class/children.d.ts +0 -0
  38. package/lib/cjs/decorators/class/children.js +24 -0
  39. package/lib/cjs/decorators/class/children.js.map +1 -0
  40. package/lib/{decorators → cjs/decorators}/collections/collectionContains.d.ts +0 -0
  41. package/lib/cjs/decorators/collections/collectionContains.js +29 -0
  42. package/lib/cjs/decorators/collections/collectionContains.js.map +1 -0
  43. package/lib/{decorators → cjs/decorators}/collections/collectionOf.d.ts +0 -0
  44. package/lib/cjs/decorators/collections/collectionOf.js +103 -0
  45. package/lib/cjs/decorators/collections/collectionOf.js.map +1 -0
  46. package/lib/{decorators → cjs/decorators}/collections/maxItems.d.ts +0 -0
  47. package/lib/cjs/decorators/collections/maxItems.js +60 -0
  48. package/lib/cjs/decorators/collections/maxItems.js.map +1 -0
  49. package/lib/{decorators → cjs/decorators}/collections/maxProperties.d.ts +0 -0
  50. package/lib/cjs/decorators/collections/maxProperties.js +83 -0
  51. package/lib/cjs/decorators/collections/maxProperties.js.map +1 -0
  52. package/lib/{decorators → cjs/decorators}/collections/minItems.d.ts +0 -0
  53. package/lib/cjs/decorators/collections/minItems.js +64 -0
  54. package/lib/cjs/decorators/collections/minItems.js.map +1 -0
  55. package/lib/{decorators → cjs/decorators}/collections/minProperties.d.ts +0 -0
  56. package/lib/cjs/decorators/collections/minProperties.js +82 -0
  57. package/lib/cjs/decorators/collections/minProperties.js.map +1 -0
  58. package/lib/{decorators → cjs/decorators}/collections/uniqueItems.d.ts +0 -0
  59. package/lib/cjs/decorators/collections/uniqueItems.js +60 -0
  60. package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -0
  61. package/lib/{decorators → cjs/decorators}/common/additionalProperties.d.ts +0 -0
  62. package/lib/cjs/decorators/common/additionalProperties.js +20 -0
  63. package/lib/cjs/decorators/common/additionalProperties.js.map +1 -0
  64. package/lib/{decorators → cjs/decorators}/common/allOf.d.ts +0 -0
  65. package/lib/cjs/decorators/common/allOf.js +22 -0
  66. package/lib/cjs/decorators/common/allOf.js.map +1 -0
  67. package/lib/{decorators → cjs/decorators}/common/allow.d.ts +0 -0
  68. package/lib/cjs/decorators/common/allow.js +47 -0
  69. package/lib/cjs/decorators/common/allow.js.map +1 -0
  70. package/lib/{decorators → cjs/decorators}/common/any.d.ts +0 -0
  71. package/lib/cjs/decorators/common/any.js +46 -0
  72. package/lib/cjs/decorators/common/any.js.map +1 -0
  73. package/lib/{decorators → cjs/decorators}/common/anyOf.d.ts +0 -0
  74. package/lib/cjs/decorators/common/anyOf.js +26 -0
  75. package/lib/cjs/decorators/common/anyOf.js.map +1 -0
  76. package/lib/{decorators → cjs/decorators}/common/const.d.ts +0 -0
  77. package/lib/cjs/decorators/common/const.js +70 -0
  78. package/lib/cjs/decorators/common/const.js.map +1 -0
  79. package/lib/{decorators → cjs/decorators}/common/customKey.d.ts +0 -0
  80. package/lib/cjs/decorators/common/customKey.js +43 -0
  81. package/lib/cjs/decorators/common/customKey.js.map +1 -0
  82. package/lib/{decorators → cjs/decorators}/common/default.d.ts +0 -0
  83. package/lib/cjs/decorators/common/default.js +51 -0
  84. package/lib/cjs/decorators/common/default.js.map +1 -0
  85. package/lib/{decorators → cjs/decorators}/common/description.d.ts +0 -0
  86. package/lib/cjs/decorators/common/description.js +76 -0
  87. package/lib/cjs/decorators/common/description.js.map +1 -0
  88. package/lib/{decorators → cjs/decorators}/common/enum.d.ts +0 -0
  89. package/lib/cjs/decorators/common/enum.js +30 -0
  90. package/lib/cjs/decorators/common/enum.js.map +1 -0
  91. package/lib/{decorators → cjs/decorators}/common/example.d.ts +0 -0
  92. package/lib/cjs/decorators/common/example.js +21 -0
  93. package/lib/cjs/decorators/common/example.js.map +1 -0
  94. package/lib/{decorators → cjs/decorators}/common/examples.d.ts +0 -0
  95. package/lib/cjs/decorators/common/examples.js +21 -0
  96. package/lib/cjs/decorators/common/examples.js.map +1 -0
  97. package/lib/{decorators → cjs/decorators}/common/exclusiveMaximum.d.ts +0 -0
  98. package/lib/cjs/decorators/common/exclusiveMaximum.js +77 -0
  99. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -0
  100. package/lib/{decorators → cjs/decorators}/common/exclusiveMinimum.d.ts +0 -0
  101. package/lib/cjs/decorators/common/exclusiveMinimum.js +77 -0
  102. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -0
  103. package/lib/{decorators → cjs/decorators}/common/format.d.ts +0 -0
  104. package/lib/cjs/decorators/common/format.js +486 -0
  105. package/lib/cjs/decorators/common/format.js.map +1 -0
  106. package/lib/{decorators → cjs/decorators}/common/forwardGroups.d.ts +0 -0
  107. package/lib/cjs/decorators/common/forwardGroups.js +20 -0
  108. package/lib/cjs/decorators/common/forwardGroups.js.map +1 -0
  109. package/lib/{decorators → cjs/decorators}/common/groups.d.ts +0 -0
  110. package/lib/cjs/decorators/common/groups.js +41 -0
  111. package/lib/cjs/decorators/common/groups.js.map +1 -0
  112. package/lib/{decorators → cjs/decorators}/common/hidden.d.ts +0 -0
  113. package/lib/cjs/decorators/common/hidden.js +40 -0
  114. package/lib/cjs/decorators/common/hidden.js.map +1 -0
  115. package/lib/{decorators → cjs/decorators}/common/ignore.d.ts +0 -0
  116. package/lib/cjs/decorators/common/ignore.js +71 -0
  117. package/lib/cjs/decorators/common/ignore.js.map +1 -0
  118. package/lib/{decorators → cjs/decorators}/common/integer.d.ts +0 -0
  119. package/lib/cjs/decorators/common/integer.js +71 -0
  120. package/lib/cjs/decorators/common/integer.js.map +1 -0
  121. package/lib/{decorators → cjs/decorators}/common/jsonEntityFn.d.ts +0 -0
  122. package/lib/cjs/decorators/common/jsonEntityFn.js +32 -0
  123. package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -0
  124. package/lib/{decorators → cjs/decorators}/common/maxLength.d.ts +0 -0
  125. package/lib/cjs/decorators/common/maxLength.js +89 -0
  126. package/lib/cjs/decorators/common/maxLength.js.map +1 -0
  127. package/lib/{decorators → cjs/decorators}/common/maximum.d.ts +0 -0
  128. package/lib/cjs/decorators/common/maximum.js +151 -0
  129. package/lib/cjs/decorators/common/maximum.js.map +1 -0
  130. package/lib/{decorators → cjs/decorators}/common/minLength.d.ts +0 -0
  131. package/lib/cjs/decorators/common/minLength.js +90 -0
  132. package/lib/cjs/decorators/common/minLength.js.map +1 -0
  133. package/lib/{decorators → cjs/decorators}/common/minimum.d.ts +0 -0
  134. package/lib/cjs/decorators/common/minimum.js +149 -0
  135. package/lib/cjs/decorators/common/minimum.js.map +1 -0
  136. package/lib/{decorators → cjs/decorators}/common/multipleOf.d.ts +0 -0
  137. package/lib/cjs/decorators/common/multipleOf.js +81 -0
  138. package/lib/cjs/decorators/common/multipleOf.js.map +1 -0
  139. package/lib/{decorators → cjs/decorators}/common/name.d.ts +0 -0
  140. package/lib/cjs/decorators/common/name.js +52 -0
  141. package/lib/cjs/decorators/common/name.js.map +1 -0
  142. package/lib/{decorators → cjs/decorators}/common/nullable.d.ts +0 -0
  143. package/lib/cjs/decorators/common/nullable.js +34 -0
  144. package/lib/cjs/decorators/common/nullable.js.map +1 -0
  145. package/lib/{decorators → cjs/decorators}/common/oneOf.d.ts +0 -0
  146. package/lib/cjs/decorators/common/oneOf.js +26 -0
  147. package/lib/cjs/decorators/common/oneOf.js.map +1 -0
  148. package/lib/{decorators → cjs/decorators}/common/optional.d.ts +0 -0
  149. package/lib/cjs/decorators/common/optional.js +28 -0
  150. package/lib/cjs/decorators/common/optional.js.map +1 -0
  151. package/lib/{decorators → cjs/decorators}/common/pattern.d.ts +0 -0
  152. package/lib/cjs/decorators/common/pattern.js +103 -0
  153. package/lib/cjs/decorators/common/pattern.js.map +1 -0
  154. package/lib/{decorators → cjs/decorators}/common/property.d.ts +0 -0
  155. package/lib/cjs/decorators/common/property.js +27 -0
  156. package/lib/cjs/decorators/common/property.js.map +1 -0
  157. package/lib/{decorators → cjs/decorators}/common/readOnly.d.ts +0 -0
  158. package/lib/cjs/decorators/common/readOnly.js +21 -0
  159. package/lib/cjs/decorators/common/readOnly.js.map +1 -0
  160. package/lib/{decorators → cjs/decorators}/common/required.d.ts +0 -0
  161. package/lib/cjs/decorators/common/required.js +53 -0
  162. package/lib/cjs/decorators/common/required.js.map +1 -0
  163. package/lib/{decorators → cjs/decorators}/common/requiredGroups.d.ts +0 -0
  164. package/lib/cjs/decorators/common/requiredGroups.js +29 -0
  165. package/lib/cjs/decorators/common/requiredGroups.js.map +1 -0
  166. package/lib/{decorators → cjs/decorators}/common/schema.d.ts +0 -0
  167. package/lib/cjs/decorators/common/schema.js +68 -0
  168. package/lib/cjs/decorators/common/schema.js.map +1 -0
  169. package/lib/{decorators → cjs/decorators}/common/title.d.ts +0 -0
  170. package/lib/cjs/decorators/common/title.js +49 -0
  171. package/lib/cjs/decorators/common/title.js.map +1 -0
  172. package/lib/{decorators → cjs/decorators}/common/writeOnly.d.ts +0 -0
  173. package/lib/cjs/decorators/common/writeOnly.js +21 -0
  174. package/lib/cjs/decorators/common/writeOnly.js.map +1 -0
  175. package/lib/{decorators → cjs/decorators}/config/jsonEntityComponent.d.ts +0 -0
  176. package/lib/cjs/decorators/config/jsonEntityComponent.js +18 -0
  177. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -0
  178. package/lib/{decorators → cjs/decorators}/generics/genericOf.d.ts +0 -0
  179. package/lib/cjs/decorators/generics/genericOf.js +99 -0
  180. package/lib/cjs/decorators/generics/genericOf.js.map +1 -0
  181. package/lib/{decorators → cjs/decorators}/generics/generics.d.ts +0 -0
  182. package/lib/cjs/decorators/generics/generics.js +25 -0
  183. package/lib/cjs/decorators/generics/generics.js.map +1 -0
  184. package/lib/{decorators → cjs/decorators}/index.d.ts +0 -0
  185. package/lib/cjs/decorators/index.js +76 -0
  186. package/lib/cjs/decorators/index.js.map +1 -0
  187. package/lib/{decorators → cjs/decorators}/operations/consumes.d.ts +0 -0
  188. package/lib/cjs/decorators/operations/consumes.js +39 -0
  189. package/lib/cjs/decorators/operations/consumes.js.map +1 -0
  190. package/lib/{decorators → cjs/decorators}/operations/contentType.d.ts +0 -0
  191. package/lib/cjs/decorators/operations/contentType.js +28 -0
  192. package/lib/cjs/decorators/operations/contentType.js.map +1 -0
  193. package/lib/{decorators → cjs/decorators}/operations/deprecated.d.ts +0 -0
  194. package/lib/cjs/decorators/operations/deprecated.js +43 -0
  195. package/lib/cjs/decorators/operations/deprecated.js.map +1 -0
  196. package/lib/{decorators → cjs/decorators}/operations/header.d.ts +0 -0
  197. package/lib/cjs/decorators/operations/header.js +59 -0
  198. package/lib/cjs/decorators/operations/header.js.map +1 -0
  199. package/lib/{decorators → cjs/decorators}/operations/in.d.ts +0 -0
  200. package/lib/cjs/decorators/operations/in.js +78 -0
  201. package/lib/cjs/decorators/operations/in.js.map +1 -0
  202. package/lib/{decorators → cjs/decorators}/operations/location.d.ts +0 -0
  203. package/lib/cjs/decorators/operations/location.js +29 -0
  204. package/lib/cjs/decorators/operations/location.js.map +1 -0
  205. package/lib/{decorators → cjs/decorators}/operations/operationId.d.ts +0 -0
  206. package/lib/cjs/decorators/operations/operationId.js +24 -0
  207. package/lib/cjs/decorators/operations/operationId.js.map +1 -0
  208. package/lib/{decorators → cjs/decorators}/operations/operationPath.d.ts +0 -0
  209. package/lib/cjs/decorators/operations/operationPath.js +34 -0
  210. package/lib/cjs/decorators/operations/operationPath.js.map +1 -0
  211. package/lib/{decorators → cjs/decorators}/operations/partial.d.ts +0 -0
  212. package/lib/cjs/decorators/operations/partial.js +18 -0
  213. package/lib/cjs/decorators/operations/partial.js.map +1 -0
  214. package/lib/{decorators → cjs/decorators}/operations/path.d.ts +0 -0
  215. package/lib/cjs/decorators/operations/path.js +29 -0
  216. package/lib/cjs/decorators/operations/path.js.map +1 -0
  217. package/lib/{decorators → cjs/decorators}/operations/produces.d.ts +0 -0
  218. package/lib/cjs/decorators/operations/produces.js +46 -0
  219. package/lib/cjs/decorators/operations/produces.js.map +1 -0
  220. package/lib/{decorators → cjs/decorators}/operations/redirect.d.ts +0 -0
  221. package/lib/cjs/decorators/operations/redirect.js +26 -0
  222. package/lib/cjs/decorators/operations/redirect.js.map +1 -0
  223. package/lib/{decorators → cjs/decorators}/operations/returns.d.ts +0 -0
  224. package/lib/cjs/decorators/operations/returns.js +215 -0
  225. package/lib/cjs/decorators/operations/returns.js.map +1 -0
  226. package/lib/{decorators → cjs/decorators}/operations/route.d.ts +0 -0
  227. package/lib/cjs/decorators/operations/route.js +198 -0
  228. package/lib/cjs/decorators/operations/route.js.map +1 -0
  229. package/lib/{decorators → cjs/decorators}/operations/security.d.ts +0 -0
  230. package/lib/cjs/decorators/operations/security.js +43 -0
  231. package/lib/cjs/decorators/operations/security.js.map +1 -0
  232. package/lib/{decorators → cjs/decorators}/operations/status.d.ts +0 -0
  233. package/lib/cjs/decorators/operations/status.js +133 -0
  234. package/lib/cjs/decorators/operations/status.js.map +1 -0
  235. package/lib/{decorators → cjs/decorators}/operations/summary.d.ts +0 -0
  236. package/lib/cjs/decorators/operations/summary.js +34 -0
  237. package/lib/cjs/decorators/operations/summary.js.map +1 -0
  238. package/lib/{decorators → cjs/decorators}/operations/tags.d.ts +0 -0
  239. package/lib/cjs/decorators/operations/tags.js +52 -0
  240. package/lib/cjs/decorators/operations/tags.js.map +1 -0
  241. package/lib/{domain → cjs/domain}/DecoratorContext.d.ts +0 -0
  242. package/lib/cjs/domain/DecoratorContext.js +88 -0
  243. package/lib/cjs/domain/DecoratorContext.js.map +1 -0
  244. package/lib/{domain → cjs/domain}/JsonAliasMap.d.ts +0 -0
  245. package/lib/cjs/domain/JsonAliasMap.js +15 -0
  246. package/lib/cjs/domain/JsonAliasMap.js.map +1 -0
  247. package/lib/{domain → cjs/domain}/JsonClassStore.d.ts +0 -0
  248. package/lib/cjs/domain/JsonClassStore.js +37 -0
  249. package/lib/cjs/domain/JsonClassStore.js.map +1 -0
  250. package/lib/{domain → cjs/domain}/JsonEntityStore.d.ts +0 -0
  251. package/lib/cjs/domain/JsonEntityStore.js +163 -0
  252. package/lib/cjs/domain/JsonEntityStore.js.map +1 -0
  253. package/lib/{domain → cjs/domain}/JsonFormatTypes.d.ts +0 -0
  254. package/lib/cjs/domain/JsonFormatTypes.js +22 -0
  255. package/lib/cjs/domain/JsonFormatTypes.js.map +1 -0
  256. package/lib/{domain → cjs/domain}/JsonLazyRef.d.ts +0 -0
  257. package/lib/cjs/domain/JsonLazyRef.js +26 -0
  258. package/lib/cjs/domain/JsonLazyRef.js.map +1 -0
  259. package/lib/{domain → cjs/domain}/JsonMap.d.ts +0 -0
  260. package/lib/cjs/domain/JsonMap.js +27 -0
  261. package/lib/cjs/domain/JsonMap.js.map +1 -0
  262. package/lib/{domain → cjs/domain}/JsonMethodStore.d.ts +0 -0
  263. package/lib/cjs/domain/JsonMethodStore.js +64 -0
  264. package/lib/cjs/domain/JsonMethodStore.js.map +1 -0
  265. package/lib/{domain → cjs/domain}/JsonOperation.d.ts +0 -0
  266. package/lib/cjs/domain/JsonOperation.js +254 -0
  267. package/lib/cjs/domain/JsonOperation.js.map +1 -0
  268. package/lib/{domain → cjs/domain}/JsonOperationPathsMap.d.ts +0 -0
  269. package/lib/cjs/domain/JsonOperationPathsMap.js +29 -0
  270. package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -0
  271. package/lib/{domain → cjs/domain}/JsonOperationRoute.d.ts +0 -0
  272. package/lib/cjs/domain/JsonOperationRoute.js +56 -0
  273. package/lib/cjs/domain/JsonOperationRoute.js.map +1 -0
  274. package/lib/{domain → cjs/domain}/JsonParameter.d.ts +0 -0
  275. package/lib/cjs/domain/JsonParameter.js +157 -0
  276. package/lib/cjs/domain/JsonParameter.js.map +1 -0
  277. package/lib/{domain → cjs/domain}/JsonParameterStore.d.ts +0 -0
  278. package/lib/cjs/domain/JsonParameterStore.js +90 -0
  279. package/lib/cjs/domain/JsonParameterStore.js.map +1 -0
  280. package/lib/{domain → cjs/domain}/JsonParameterTypes.d.ts +0 -0
  281. package/lib/cjs/domain/JsonParameterTypes.js +27 -0
  282. package/lib/cjs/domain/JsonParameterTypes.js.map +1 -0
  283. package/lib/{domain → cjs/domain}/JsonPropertyStore.d.ts +0 -0
  284. package/lib/cjs/domain/JsonPropertyStore.js +68 -0
  285. package/lib/cjs/domain/JsonPropertyStore.js.map +1 -0
  286. package/lib/{domain → cjs/domain}/JsonRequestBody.d.ts +0 -0
  287. package/lib/cjs/domain/JsonRequestBody.js +32 -0
  288. package/lib/cjs/domain/JsonRequestBody.js.map +1 -0
  289. package/lib/{domain → cjs/domain}/JsonResponse.d.ts +0 -0
  290. package/lib/cjs/domain/JsonResponse.js +86 -0
  291. package/lib/cjs/domain/JsonResponse.js.map +1 -0
  292. package/lib/{domain → cjs/domain}/JsonSchema.d.ts +0 -0
  293. package/lib/cjs/domain/JsonSchema.js +692 -0
  294. package/lib/cjs/domain/JsonSchema.js.map +1 -0
  295. package/lib/{domain → cjs/domain}/SpecTypes.d.ts +0 -0
  296. package/lib/cjs/domain/SpecTypes.js +10 -0
  297. package/lib/cjs/domain/SpecTypes.js.map +1 -0
  298. package/lib/{domain → cjs/domain}/index.d.ts +0 -0
  299. package/lib/cjs/domain/index.js +20 -0
  300. package/lib/cjs/domain/index.js.map +1 -0
  301. package/lib/{hooks → cjs/hooks}/alterIgnore.d.ts +0 -0
  302. package/lib/cjs/hooks/alterIgnore.js +21 -0
  303. package/lib/cjs/hooks/alterIgnore.js.map +1 -0
  304. package/lib/{hooks → cjs/hooks}/alterRequiredGroups.d.ts +0 -0
  305. package/lib/cjs/hooks/alterRequiredGroups.js +15 -0
  306. package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -0
  307. package/lib/{index.d.ts → cjs/index.d.ts} +0 -0
  308. package/lib/cjs/index.js +23 -0
  309. package/lib/cjs/index.js.map +1 -0
  310. package/lib/{interfaces → cjs/interfaces}/IgnoreCallback.d.ts +0 -0
  311. package/lib/cjs/interfaces/IgnoreCallback.js +3 -0
  312. package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -0
  313. package/lib/{interfaces → cjs/interfaces}/JsonHookContext.d.ts +0 -0
  314. package/lib/cjs/interfaces/JsonHookContext.js +3 -0
  315. package/lib/cjs/interfaces/JsonHookContext.js.map +1 -0
  316. package/lib/{interfaces → cjs/interfaces}/JsonOpenSpec.d.ts +0 -0
  317. package/lib/cjs/interfaces/JsonOpenSpec.js +3 -0
  318. package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -0
  319. package/lib/{interfaces → cjs/interfaces}/JsonSchemaOptions.d.ts +0 -0
  320. package/lib/cjs/interfaces/JsonSchemaOptions.js +3 -0
  321. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -0
  322. package/lib/{interfaces → cjs/interfaces}/index.d.ts +0 -0
  323. package/lib/cjs/interfaces/index.js +8 -0
  324. package/lib/cjs/interfaces/index.js.map +1 -0
  325. package/lib/{registries → cjs/registries}/JsonSchemaMapperContainer.d.ts +0 -0
  326. package/lib/cjs/registries/JsonSchemaMapperContainer.js +33 -0
  327. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -0
  328. package/lib/{utils → cjs/utils}/buildPath.d.ts +0 -0
  329. package/lib/cjs/utils/buildPath.js +13 -0
  330. package/lib/cjs/utils/buildPath.js.map +1 -0
  331. package/lib/{utils → cjs/utils}/concatParameters.d.ts +0 -0
  332. package/lib/cjs/utils/concatParameters.js +16 -0
  333. package/lib/cjs/utils/concatParameters.js.map +1 -0
  334. package/lib/{utils → cjs/utils}/concatPath.d.ts +0 -0
  335. package/lib/cjs/utils/concatPath.js +8 -0
  336. package/lib/cjs/utils/concatPath.js.map +1 -0
  337. package/lib/{utils → cjs/utils}/defineStatusModel.d.ts +0 -0
  338. package/lib/cjs/utils/defineStatusModel.js +13 -0
  339. package/lib/cjs/utils/defineStatusModel.js.map +1 -0
  340. package/lib/{utils → cjs/utils}/from.d.ts +0 -0
  341. package/lib/cjs/utils/from.js +272 -0
  342. package/lib/cjs/utils/from.js.map +1 -0
  343. package/lib/{utils → cjs/utils}/generics.d.ts +0 -0
  344. package/lib/cjs/utils/generics.js +40 -0
  345. package/lib/cjs/utils/generics.js.map +1 -0
  346. package/lib/{utils → cjs/utils}/getComputedType.d.ts +0 -0
  347. package/lib/cjs/utils/getComputedType.js +26 -0
  348. package/lib/cjs/utils/getComputedType.js.map +1 -0
  349. package/lib/{utils → cjs/utils}/getInheritedStores.d.ts +0 -0
  350. package/lib/cjs/utils/getInheritedStores.js +23 -0
  351. package/lib/cjs/utils/getInheritedStores.js.map +1 -0
  352. package/lib/{utils → cjs/utils}/getJsonEntityStore.d.ts +0 -0
  353. package/lib/cjs/utils/getJsonEntityStore.js +25 -0
  354. package/lib/cjs/utils/getJsonEntityStore.js.map +1 -0
  355. package/lib/{utils → cjs/utils}/getJsonPathParameters.d.ts +0 -0
  356. package/lib/cjs/utils/getJsonPathParameters.js +73 -0
  357. package/lib/cjs/utils/getJsonPathParameters.js.map +1 -0
  358. package/lib/{utils → cjs/utils}/getJsonSchema.d.ts +0 -0
  359. package/lib/cjs/utils/getJsonSchema.js +55 -0
  360. package/lib/cjs/utils/getJsonSchema.js.map +1 -0
  361. package/lib/{utils → cjs/utils}/getJsonType.d.ts +0 -0
  362. package/lib/cjs/utils/getJsonType.js +40 -0
  363. package/lib/cjs/utils/getJsonType.js.map +1 -0
  364. package/lib/{utils → cjs/utils}/getOperationsRoutes.d.ts +0 -0
  365. package/lib/cjs/utils/getOperationsRoutes.js +36 -0
  366. package/lib/cjs/utils/getOperationsRoutes.js.map +1 -0
  367. package/lib/{utils → cjs/utils}/getOperationsStores.d.ts +0 -0
  368. package/lib/cjs/utils/getOperationsStores.js +33 -0
  369. package/lib/cjs/utils/getOperationsStores.js.map +1 -0
  370. package/lib/{utils → cjs/utils}/getPropertiesStores.d.ts +0 -0
  371. package/lib/cjs/utils/getPropertiesStores.js +45 -0
  372. package/lib/cjs/utils/getPropertiesStores.js.map +1 -0
  373. package/lib/{utils → cjs/utils}/getRequiredProperties.d.ts +0 -0
  374. package/lib/cjs/utils/getRequiredProperties.js +67 -0
  375. package/lib/cjs/utils/getRequiredProperties.js.map +1 -0
  376. package/lib/{utils → cjs/utils}/getSpec.d.ts +0 -0
  377. package/lib/cjs/utils/getSpec.js +87 -0
  378. package/lib/cjs/utils/getSpec.js.map +1 -0
  379. package/lib/{utils → cjs/utils}/isJsonClass.d.ts +0 -0
  380. package/lib/cjs/utils/isJsonClass.js +12 -0
  381. package/lib/cjs/utils/isJsonClass.js.map +1 -0
  382. package/lib/{utils → cjs/utils}/isSuccessStatus.d.ts +0 -0
  383. package/lib/cjs/utils/isSuccessStatus.js +8 -0
  384. package/lib/cjs/utils/isSuccessStatus.js.map +1 -0
  385. package/lib/{utils → cjs/utils}/mapHeaders.d.ts +0 -0
  386. package/lib/cjs/utils/mapHeaders.js +29 -0
  387. package/lib/cjs/utils/mapHeaders.js.map +1 -0
  388. package/lib/{utils → cjs/utils}/mapNullableType.d.ts +0 -0
  389. package/lib/cjs/utils/mapNullableType.js +30 -0
  390. package/lib/cjs/utils/mapNullableType.js.map +1 -0
  391. package/lib/{utils → cjs/utils}/mapRouteOptions.d.ts +0 -0
  392. package/lib/cjs/utils/mapRouteOptions.js +26 -0
  393. package/lib/cjs/utils/mapRouteOptions.js.map +1 -0
  394. package/lib/{utils → cjs/utils}/matchGroups.d.ts +0 -0
  395. package/lib/cjs/utils/matchGroups.js +23 -0
  396. package/lib/cjs/utils/matchGroups.js.map +1 -0
  397. package/lib/{utils → cjs/utils}/mergeOperation.d.ts +0 -0
  398. package/lib/cjs/utils/mergeOperation.js +44 -0
  399. package/lib/cjs/utils/mergeOperation.js.map +1 -0
  400. package/lib/{utils → cjs/utils}/mergeSpec.d.ts +0 -0
  401. package/lib/cjs/utils/mergeSpec.js +46 -0
  402. package/lib/cjs/utils/mergeSpec.js.map +1 -0
  403. package/lib/{utils → cjs/utils}/operationIdFormatter.d.ts +0 -0
  404. package/lib/cjs/utils/operationIdFormatter.js +37 -0
  405. package/lib/cjs/utils/operationIdFormatter.js.map +1 -0
  406. package/lib/{utils → cjs/utils}/ref.d.ts +0 -0
  407. package/lib/cjs/utils/ref.js +70 -0
  408. package/lib/cjs/utils/ref.js.map +1 -0
  409. package/lib/{utils → cjs/utils}/toJsonMapCollection.d.ts +0 -0
  410. package/lib/cjs/utils/toJsonMapCollection.js +15 -0
  411. package/lib/cjs/utils/toJsonMapCollection.js.map +1 -0
  412. package/lib/{utils → cjs/utils}/toJsonRegex.d.ts +0 -0
  413. package/lib/cjs/utils/toJsonRegex.js +12 -0
  414. package/lib/cjs/utils/toJsonRegex.js.map +1 -0
  415. package/lib/esm/components/anyMapper.js +20 -0
  416. package/lib/esm/components/anyMapper.js.map +1 -0
  417. package/lib/esm/components/classMapper.js +37 -0
  418. package/lib/esm/components/classMapper.js.map +1 -0
  419. package/lib/esm/components/genericsMapper.js +58 -0
  420. package/lib/esm/components/genericsMapper.js.map +1 -0
  421. package/lib/esm/components/index.js +10 -0
  422. package/lib/esm/components/index.js.map +1 -0
  423. package/lib/esm/components/inheritedClassMapper.js +18 -0
  424. package/lib/esm/components/inheritedClassMapper.js.map +1 -0
  425. package/lib/esm/components/itemMapper.js +6 -0
  426. package/lib/esm/components/itemMapper.js.map +1 -0
  427. package/lib/esm/components/lazyRefMapper.js +15 -0
  428. package/lib/esm/components/lazyRefMapper.js.map +1 -0
  429. package/lib/esm/components/mapMapper.js +21 -0
  430. package/lib/esm/components/mapMapper.js.map +1 -0
  431. package/lib/esm/components/objectMapper.js +21 -0
  432. package/lib/esm/components/objectMapper.js.map +1 -0
  433. package/lib/esm/components/schemaMapper.js +96 -0
  434. package/lib/esm/components/schemaMapper.js.map +1 -0
  435. package/lib/esm/constants/httpMethods.js +43 -0
  436. package/lib/esm/constants/httpMethods.js.map +1 -0
  437. package/lib/esm/constants/httpStatusMessages.js +105 -0
  438. package/lib/esm/constants/httpStatusMessages.js.map +1 -0
  439. package/lib/esm/decorators/class/children.js +20 -0
  440. package/lib/esm/decorators/class/children.js.map +1 -0
  441. package/lib/esm/decorators/collections/collectionContains.js +25 -0
  442. package/lib/esm/decorators/collections/collectionContains.js.map +1 -0
  443. package/lib/esm/decorators/collections/collectionOf.js +97 -0
  444. package/lib/esm/decorators/collections/collectionOf.js.map +1 -0
  445. package/lib/esm/decorators/collections/maxItems.js +56 -0
  446. package/lib/esm/decorators/collections/maxItems.js.map +1 -0
  447. package/lib/esm/decorators/collections/maxProperties.js +79 -0
  448. package/lib/esm/decorators/collections/maxProperties.js.map +1 -0
  449. package/lib/esm/decorators/collections/minItems.js +60 -0
  450. package/lib/esm/decorators/collections/minItems.js.map +1 -0
  451. package/lib/esm/decorators/collections/minProperties.js +78 -0
  452. package/lib/esm/decorators/collections/minProperties.js.map +1 -0
  453. package/lib/esm/decorators/collections/uniqueItems.js +56 -0
  454. package/lib/esm/decorators/collections/uniqueItems.js.map +1 -0
  455. package/lib/esm/decorators/common/additionalProperties.js +16 -0
  456. package/lib/esm/decorators/common/additionalProperties.js.map +1 -0
  457. package/lib/esm/decorators/common/allOf.js +18 -0
  458. package/lib/esm/decorators/common/allOf.js.map +1 -0
  459. package/lib/esm/decorators/common/allow.js +43 -0
  460. package/lib/esm/decorators/common/allow.js.map +1 -0
  461. package/lib/esm/decorators/common/any.js +42 -0
  462. package/lib/esm/decorators/common/any.js.map +1 -0
  463. package/lib/esm/decorators/common/anyOf.js +22 -0
  464. package/lib/esm/decorators/common/anyOf.js.map +1 -0
  465. package/lib/esm/decorators/common/const.js +66 -0
  466. package/lib/esm/decorators/common/const.js.map +1 -0
  467. package/lib/esm/decorators/common/customKey.js +38 -0
  468. package/lib/esm/decorators/common/customKey.js.map +1 -0
  469. package/lib/esm/decorators/common/default.js +47 -0
  470. package/lib/esm/decorators/common/default.js.map +1 -0
  471. package/lib/esm/decorators/common/description.js +72 -0
  472. package/lib/esm/decorators/common/description.js.map +1 -0
  473. package/lib/esm/decorators/common/enum.js +26 -0
  474. package/lib/esm/decorators/common/enum.js.map +1 -0
  475. package/lib/esm/decorators/common/example.js +17 -0
  476. package/lib/esm/decorators/common/example.js.map +1 -0
  477. package/lib/esm/decorators/common/examples.js +17 -0
  478. package/lib/esm/decorators/common/examples.js.map +1 -0
  479. package/lib/esm/decorators/common/exclusiveMaximum.js +73 -0
  480. package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -0
  481. package/lib/esm/decorators/common/exclusiveMinimum.js +73 -0
  482. package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -0
  483. package/lib/esm/decorators/common/format.js +476 -0
  484. package/lib/esm/decorators/common/format.js.map +1 -0
  485. package/lib/esm/decorators/common/forwardGroups.js +16 -0
  486. package/lib/esm/decorators/common/forwardGroups.js.map +1 -0
  487. package/lib/esm/decorators/common/groups.js +37 -0
  488. package/lib/esm/decorators/common/groups.js.map +1 -0
  489. package/lib/esm/decorators/common/hidden.js +36 -0
  490. package/lib/esm/decorators/common/hidden.js.map +1 -0
  491. package/lib/esm/decorators/common/ignore.js +67 -0
  492. package/lib/esm/decorators/common/ignore.js.map +1 -0
  493. package/lib/esm/decorators/common/integer.js +67 -0
  494. package/lib/esm/decorators/common/integer.js.map +1 -0
  495. package/lib/esm/decorators/common/jsonEntityFn.js +28 -0
  496. package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -0
  497. package/lib/esm/decorators/common/maxLength.js +85 -0
  498. package/lib/esm/decorators/common/maxLength.js.map +1 -0
  499. package/lib/esm/decorators/common/maximum.js +146 -0
  500. package/lib/esm/decorators/common/maximum.js.map +1 -0
  501. package/lib/esm/decorators/common/minLength.js +86 -0
  502. package/lib/esm/decorators/common/minLength.js.map +1 -0
  503. package/lib/esm/decorators/common/minimum.js +144 -0
  504. package/lib/esm/decorators/common/minimum.js.map +1 -0
  505. package/lib/esm/decorators/common/multipleOf.js +77 -0
  506. package/lib/esm/decorators/common/multipleOf.js.map +1 -0
  507. package/lib/esm/decorators/common/name.js +48 -0
  508. package/lib/esm/decorators/common/name.js.map +1 -0
  509. package/lib/esm/decorators/common/nullable.js +30 -0
  510. package/lib/esm/decorators/common/nullable.js.map +1 -0
  511. package/lib/esm/decorators/common/oneOf.js +22 -0
  512. package/lib/esm/decorators/common/oneOf.js.map +1 -0
  513. package/lib/esm/decorators/common/optional.js +24 -0
  514. package/lib/esm/decorators/common/optional.js.map +1 -0
  515. package/lib/esm/decorators/common/pattern.js +99 -0
  516. package/lib/esm/decorators/common/pattern.js.map +1 -0
  517. package/lib/esm/decorators/common/property.js +23 -0
  518. package/lib/esm/decorators/common/property.js.map +1 -0
  519. package/lib/esm/decorators/common/readOnly.js +17 -0
  520. package/lib/esm/decorators/common/readOnly.js.map +1 -0
  521. package/lib/esm/decorators/common/required.js +49 -0
  522. package/lib/esm/decorators/common/required.js.map +1 -0
  523. package/lib/esm/decorators/common/requiredGroups.js +25 -0
  524. package/lib/esm/decorators/common/requiredGroups.js.map +1 -0
  525. package/lib/esm/decorators/common/schema.js +63 -0
  526. package/lib/esm/decorators/common/schema.js.map +1 -0
  527. package/lib/esm/decorators/common/title.js +45 -0
  528. package/lib/esm/decorators/common/title.js.map +1 -0
  529. package/lib/esm/decorators/common/writeOnly.js +17 -0
  530. package/lib/esm/decorators/common/writeOnly.js.map +1 -0
  531. package/lib/esm/decorators/config/jsonEntityComponent.js +14 -0
  532. package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -0
  533. package/lib/esm/decorators/generics/genericOf.js +95 -0
  534. package/lib/esm/decorators/generics/genericOf.js.map +1 -0
  535. package/lib/esm/decorators/generics/generics.js +21 -0
  536. package/lib/esm/decorators/generics/generics.js.map +1 -0
  537. package/lib/esm/decorators/index.js +73 -0
  538. package/lib/esm/decorators/index.js.map +1 -0
  539. package/lib/esm/decorators/operations/consumes.js +35 -0
  540. package/lib/esm/decorators/operations/consumes.js.map +1 -0
  541. package/lib/esm/decorators/operations/contentType.js +24 -0
  542. package/lib/esm/decorators/operations/contentType.js.map +1 -0
  543. package/lib/esm/decorators/operations/deprecated.js +39 -0
  544. package/lib/esm/decorators/operations/deprecated.js.map +1 -0
  545. package/lib/esm/decorators/operations/header.js +55 -0
  546. package/lib/esm/decorators/operations/header.js.map +1 -0
  547. package/lib/esm/decorators/operations/in.js +74 -0
  548. package/lib/esm/decorators/operations/in.js.map +1 -0
  549. package/lib/esm/decorators/operations/location.js +25 -0
  550. package/lib/esm/decorators/operations/location.js.map +1 -0
  551. package/lib/esm/decorators/operations/operationId.js +20 -0
  552. package/lib/esm/decorators/operations/operationId.js.map +1 -0
  553. package/lib/esm/decorators/operations/operationPath.js +30 -0
  554. package/lib/esm/decorators/operations/operationPath.js.map +1 -0
  555. package/lib/esm/decorators/operations/partial.js +14 -0
  556. package/lib/esm/decorators/operations/partial.js.map +1 -0
  557. package/lib/esm/decorators/operations/path.js +25 -0
  558. package/lib/esm/decorators/operations/path.js.map +1 -0
  559. package/lib/esm/decorators/operations/produces.js +42 -0
  560. package/lib/esm/decorators/operations/produces.js.map +1 -0
  561. package/lib/esm/decorators/operations/redirect.js +22 -0
  562. package/lib/esm/decorators/operations/redirect.js.map +1 -0
  563. package/lib/esm/decorators/operations/returns.js +211 -0
  564. package/lib/esm/decorators/operations/returns.js.map +1 -0
  565. package/lib/esm/decorators/operations/route.js +186 -0
  566. package/lib/esm/decorators/operations/route.js.map +1 -0
  567. package/lib/esm/decorators/operations/security.js +39 -0
  568. package/lib/esm/decorators/operations/security.js.map +1 -0
  569. package/lib/esm/decorators/operations/status.js +129 -0
  570. package/lib/esm/decorators/operations/status.js.map +1 -0
  571. package/lib/esm/decorators/operations/summary.js +30 -0
  572. package/lib/esm/decorators/operations/summary.js.map +1 -0
  573. package/lib/esm/decorators/operations/tags.js +48 -0
  574. package/lib/esm/decorators/operations/tags.js.map +1 -0
  575. package/lib/esm/domain/DecoratorContext.js +84 -0
  576. package/lib/esm/domain/DecoratorContext.js.map +1 -0
  577. package/lib/esm/domain/JsonAliasMap.js +11 -0
  578. package/lib/esm/domain/JsonAliasMap.js.map +1 -0
  579. package/lib/esm/domain/JsonClassStore.js +34 -0
  580. package/lib/esm/domain/JsonClassStore.js.map +1 -0
  581. package/lib/esm/domain/JsonEntityStore.js +159 -0
  582. package/lib/esm/domain/JsonEntityStore.js.map +1 -0
  583. package/lib/esm/domain/JsonFormatTypes.js +19 -0
  584. package/lib/esm/domain/JsonFormatTypes.js.map +1 -0
  585. package/lib/esm/domain/JsonLazyRef.js +22 -0
  586. package/lib/esm/domain/JsonLazyRef.js.map +1 -0
  587. package/lib/esm/domain/JsonMap.js +23 -0
  588. package/lib/esm/domain/JsonMap.js.map +1 -0
  589. package/lib/esm/domain/JsonMethodStore.js +61 -0
  590. package/lib/esm/domain/JsonMethodStore.js.map +1 -0
  591. package/lib/esm/domain/JsonOperation.js +250 -0
  592. package/lib/esm/domain/JsonOperation.js.map +1 -0
  593. package/lib/esm/domain/JsonOperationPathsMap.js +25 -0
  594. package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -0
  595. package/lib/esm/domain/JsonOperationRoute.js +52 -0
  596. package/lib/esm/domain/JsonOperationRoute.js.map +1 -0
  597. package/lib/esm/domain/JsonParameter.js +153 -0
  598. package/lib/esm/domain/JsonParameter.js.map +1 -0
  599. package/lib/esm/domain/JsonParameterStore.js +87 -0
  600. package/lib/esm/domain/JsonParameterStore.js.map +1 -0
  601. package/lib/esm/domain/JsonParameterTypes.js +22 -0
  602. package/lib/esm/domain/JsonParameterTypes.js.map +1 -0
  603. package/lib/esm/domain/JsonPropertyStore.js +65 -0
  604. package/lib/esm/domain/JsonPropertyStore.js.map +1 -0
  605. package/lib/esm/domain/JsonRequestBody.js +28 -0
  606. package/lib/esm/domain/JsonRequestBody.js.map +1 -0
  607. package/lib/esm/domain/JsonResponse.js +81 -0
  608. package/lib/esm/domain/JsonResponse.js.map +1 -0
  609. package/lib/esm/domain/JsonSchema.js +688 -0
  610. package/lib/esm/domain/JsonSchema.js.map +1 -0
  611. package/lib/esm/domain/SpecTypes.js +7 -0
  612. package/lib/esm/domain/SpecTypes.js.map +1 -0
  613. package/lib/esm/domain/index.js +17 -0
  614. package/lib/esm/domain/index.js.map +1 -0
  615. package/lib/esm/hooks/alterIgnore.js +17 -0
  616. package/lib/esm/hooks/alterIgnore.js.map +1 -0
  617. package/lib/esm/hooks/alterRequiredGroups.js +11 -0
  618. package/lib/esm/hooks/alterRequiredGroups.js.map +1 -0
  619. package/lib/esm/index.js +20 -0
  620. package/lib/esm/index.js.map +1 -0
  621. package/lib/esm/interfaces/IgnoreCallback.js +2 -0
  622. package/lib/esm/interfaces/IgnoreCallback.js.map +1 -0
  623. package/lib/esm/interfaces/JsonHookContext.js +2 -0
  624. package/lib/esm/interfaces/JsonHookContext.js.map +1 -0
  625. package/lib/esm/interfaces/JsonOpenSpec.js +2 -0
  626. package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -0
  627. package/lib/esm/interfaces/JsonSchemaOptions.js +2 -0
  628. package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -0
  629. package/lib/esm/interfaces/index.js +5 -0
  630. package/lib/esm/interfaces/index.js.map +1 -0
  631. package/lib/esm/registries/JsonSchemaMapperContainer.js +27 -0
  632. package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -0
  633. package/lib/esm/utils/buildPath.js +9 -0
  634. package/lib/esm/utils/buildPath.js.map +1 -0
  635. package/lib/esm/utils/concatParameters.js +12 -0
  636. package/lib/esm/utils/concatParameters.js.map +1 -0
  637. package/lib/esm/utils/concatPath.js +4 -0
  638. package/lib/esm/utils/concatPath.js.map +1 -0
  639. package/lib/esm/utils/defineStatusModel.js +8 -0
  640. package/lib/esm/utils/defineStatusModel.js.map +1 -0
  641. package/lib/esm/utils/from.js +249 -0
  642. package/lib/esm/utils/from.js.map +1 -0
  643. package/lib/esm/utils/generics.js +34 -0
  644. package/lib/esm/utils/generics.js.map +1 -0
  645. package/lib/esm/utils/getComputedType.js +22 -0
  646. package/lib/esm/utils/getComputedType.js.map +1 -0
  647. package/lib/esm/utils/getInheritedStores.js +19 -0
  648. package/lib/esm/utils/getInheritedStores.js.map +1 -0
  649. package/lib/esm/utils/getJsonEntityStore.js +20 -0
  650. package/lib/esm/utils/getJsonEntityStore.js.map +1 -0
  651. package/lib/esm/utils/getJsonPathParameters.js +69 -0
  652. package/lib/esm/utils/getJsonPathParameters.js.map +1 -0
  653. package/lib/esm/utils/getJsonSchema.js +51 -0
  654. package/lib/esm/utils/getJsonSchema.js.map +1 -0
  655. package/lib/esm/utils/getJsonType.js +36 -0
  656. package/lib/esm/utils/getJsonType.js.map +1 -0
  657. package/lib/esm/utils/getOperationsRoutes.js +32 -0
  658. package/lib/esm/utils/getOperationsRoutes.js.map +1 -0
  659. package/lib/esm/utils/getOperationsStores.js +29 -0
  660. package/lib/esm/utils/getOperationsStores.js.map +1 -0
  661. package/lib/esm/utils/getPropertiesStores.js +40 -0
  662. package/lib/esm/utils/getPropertiesStores.js.map +1 -0
  663. package/lib/esm/utils/getRequiredProperties.js +63 -0
  664. package/lib/esm/utils/getRequiredProperties.js.map +1 -0
  665. package/lib/esm/utils/getSpec.js +83 -0
  666. package/lib/esm/utils/getSpec.js.map +1 -0
  667. package/lib/esm/utils/isJsonClass.js +8 -0
  668. package/lib/esm/utils/isJsonClass.js.map +1 -0
  669. package/lib/esm/utils/isSuccessStatus.js +3 -0
  670. package/lib/esm/utils/isSuccessStatus.js.map +1 -0
  671. package/lib/esm/utils/mapHeaders.js +25 -0
  672. package/lib/esm/utils/mapHeaders.js.map +1 -0
  673. package/lib/esm/utils/mapNullableType.js +26 -0
  674. package/lib/esm/utils/mapNullableType.js.map +1 -0
  675. package/lib/esm/utils/mapRouteOptions.js +22 -0
  676. package/lib/esm/utils/mapRouteOptions.js.map +1 -0
  677. package/lib/esm/utils/matchGroups.js +18 -0
  678. package/lib/esm/utils/matchGroups.js.map +1 -0
  679. package/lib/esm/utils/mergeOperation.js +40 -0
  680. package/lib/esm/utils/mergeOperation.js.map +1 -0
  681. package/lib/esm/utils/mergeSpec.js +42 -0
  682. package/lib/esm/utils/mergeSpec.js.map +1 -0
  683. package/lib/esm/utils/operationIdFormatter.js +33 -0
  684. package/lib/esm/utils/operationIdFormatter.js.map +1 -0
  685. package/lib/esm/utils/ref.js +64 -0
  686. package/lib/esm/utils/ref.js.map +1 -0
  687. package/lib/esm/utils/toJsonMapCollection.js +11 -0
  688. package/lib/esm/utils/toJsonMapCollection.js.map +1 -0
  689. package/lib/esm/utils/toJsonRegex.js +8 -0
  690. package/lib/esm/utils/toJsonRegex.js.map +1 -0
  691. package/lib/types/components/anyMapper.d.ts +2 -0
  692. package/lib/types/components/classMapper.d.ts +3 -0
  693. package/lib/types/components/genericsMapper.d.ts +5 -0
  694. package/lib/types/components/index.d.ts +9 -0
  695. package/lib/types/components/inheritedClassMapper.d.ts +5 -0
  696. package/lib/types/components/itemMapper.d.ts +2 -0
  697. package/lib/types/components/lazyRefMapper.d.ts +3 -0
  698. package/lib/types/components/mapMapper.d.ts +9 -0
  699. package/lib/types/components/objectMapper.d.ts +8 -0
  700. package/lib/types/components/schemaMapper.d.ts +3 -0
  701. package/lib/types/constants/httpMethods.d.ts +12 -0
  702. package/lib/types/constants/httpStatusMessages.d.ts +272 -0
  703. package/lib/types/decorators/class/children.d.ts +11 -0
  704. package/lib/types/decorators/collections/collectionContains.d.ts +21 -0
  705. package/lib/types/decorators/collections/collectionOf.d.ts +101 -0
  706. package/lib/types/decorators/collections/maxItems.d.ts +47 -0
  707. package/lib/types/decorators/collections/maxProperties.d.ts +70 -0
  708. package/lib/types/decorators/collections/minItems.d.ts +51 -0
  709. package/lib/types/decorators/collections/minProperties.d.ts +69 -0
  710. package/lib/types/decorators/collections/uniqueItems.d.ts +50 -0
  711. package/lib/types/decorators/common/additionalProperties.d.ts +11 -0
  712. package/lib/types/decorators/common/allOf.d.ts +13 -0
  713. package/lib/types/decorators/common/allow.d.ts +28 -0
  714. package/lib/types/decorators/common/any.d.ts +38 -0
  715. package/lib/types/decorators/common/anyOf.d.ts +17 -0
  716. package/lib/types/decorators/common/const.d.ts +61 -0
  717. package/lib/types/decorators/common/customKey.d.ts +26 -0
  718. package/lib/types/decorators/common/default.d.ts +41 -0
  719. package/lib/types/decorators/common/description.d.ts +53 -0
  720. package/lib/types/decorators/common/enum.d.ts +98 -0
  721. package/lib/types/decorators/common/example.d.ts +11 -0
  722. package/lib/types/decorators/common/examples.d.ts +12 -0
  723. package/lib/types/decorators/common/exclusiveMaximum.d.ts +69 -0
  724. package/lib/types/decorators/common/exclusiveMinimum.d.ts +69 -0
  725. package/lib/types/decorators/common/format.d.ts +459 -0
  726. package/lib/types/decorators/common/forwardGroups.d.ts +10 -0
  727. package/lib/types/decorators/common/groups.d.ts +11 -0
  728. package/lib/types/decorators/common/hidden.d.ts +32 -0
  729. package/lib/types/decorators/common/ignore.d.ts +58 -0
  730. package/lib/types/decorators/common/integer.d.ts +61 -0
  731. package/lib/types/decorators/common/jsonEntityFn.d.ts +21 -0
  732. package/lib/types/decorators/common/maxLength.d.ts +76 -0
  733. package/lib/types/decorators/common/maximum.d.ts +138 -0
  734. package/lib/types/decorators/common/minLength.d.ts +77 -0
  735. package/lib/types/decorators/common/minimum.d.ts +136 -0
  736. package/lib/types/decorators/common/multipleOf.d.ts +68 -0
  737. package/lib/types/decorators/common/name.d.ts +32 -0
  738. package/lib/types/decorators/common/nullable.d.ts +25 -0
  739. package/lib/types/decorators/common/oneOf.d.ts +17 -0
  740. package/lib/types/decorators/common/optional.d.ts +10 -0
  741. package/lib/types/decorators/common/pattern.d.ts +93 -0
  742. package/lib/types/decorators/common/property.d.ts +11 -0
  743. package/lib/types/decorators/common/readOnly.d.ts +11 -0
  744. package/lib/types/decorators/common/required.d.ts +44 -0
  745. package/lib/types/decorators/common/requiredGroups.d.ts +10 -0
  746. package/lib/types/decorators/common/schema.d.ts +53 -0
  747. package/lib/types/decorators/common/title.d.ts +39 -0
  748. package/lib/types/decorators/common/writeOnly.d.ts +11 -0
  749. package/lib/types/decorators/config/jsonEntityComponent.d.ts +10 -0
  750. package/lib/types/decorators/generics/genericOf.d.ts +76 -0
  751. package/lib/types/decorators/generics/generics.d.ts +14 -0
  752. package/lib/types/decorators/index.d.ts +67 -0
  753. package/lib/types/decorators/operations/consumes.d.ts +19 -0
  754. package/lib/types/decorators/operations/contentType.d.ts +20 -0
  755. package/lib/types/decorators/operations/deprecated.d.ts +23 -0
  756. package/lib/types/decorators/operations/header.d.ts +49 -0
  757. package/lib/types/decorators/operations/in.d.ts +64 -0
  758. package/lib/types/decorators/operations/location.d.ts +22 -0
  759. package/lib/types/decorators/operations/operationId.d.ts +10 -0
  760. package/lib/types/decorators/operations/operationPath.d.ts +21 -0
  761. package/lib/types/decorators/operations/partial.d.ts +10 -0
  762. package/lib/types/decorators/operations/path.d.ts +15 -0
  763. package/lib/types/decorators/operations/produces.d.ts +26 -0
  764. package/lib/types/decorators/operations/redirect.d.ts +52 -0
  765. package/lib/types/decorators/operations/returns.d.ts +238 -0
  766. package/lib/types/decorators/operations/route.d.ts +185 -0
  767. package/lib/types/decorators/operations/security.d.ts +23 -0
  768. package/lib/types/decorators/operations/status.d.ts +127 -0
  769. package/lib/types/decorators/operations/summary.d.ts +20 -0
  770. package/lib/types/decorators/operations/tags.d.ts +23 -0
  771. package/lib/types/domain/DecoratorContext.d.ts +28 -0
  772. package/lib/types/domain/JsonAliasMap.d.ts +12 -0
  773. package/lib/types/domain/JsonClassStore.d.ts +12 -0
  774. package/lib/types/domain/JsonEntityStore.d.ts +132 -0
  775. package/lib/types/domain/JsonFormatTypes.d.ts +17 -0
  776. package/lib/types/domain/JsonLazyRef.d.ts +11 -0
  777. package/lib/types/domain/JsonMap.d.ts +7 -0
  778. package/lib/types/domain/JsonMethodStore.d.ts +19 -0
  779. package/lib/types/domain/JsonOperation.d.ts +51 -0
  780. package/lib/types/domain/JsonOperationPathsMap.d.ts +7 -0
  781. package/lib/types/domain/JsonOperationRoute.d.ts +24 -0
  782. package/lib/types/domain/JsonParameter.d.ts +22 -0
  783. package/lib/types/domain/JsonParameterStore.d.ts +30 -0
  784. package/lib/types/domain/JsonParameterTypes.d.ts +16 -0
  785. package/lib/types/domain/JsonPropertyStore.d.ts +23 -0
  786. package/lib/types/domain/JsonRequestBody.d.ts +11 -0
  787. package/lib/types/domain/JsonResponse.d.ts +22 -0
  788. package/lib/types/domain/JsonSchema.d.ts +337 -0
  789. package/lib/types/domain/SpecTypes.d.ts +5 -0
  790. package/lib/types/domain/index.d.ts +16 -0
  791. package/lib/types/hooks/alterIgnore.d.ts +9 -0
  792. package/lib/types/hooks/alterRequiredGroups.d.ts +6 -0
  793. package/lib/types/index.d.ts +19 -0
  794. package/lib/types/interfaces/IgnoreCallback.d.ts +4 -0
  795. package/lib/types/interfaces/JsonHookContext.d.ts +17 -0
  796. package/lib/types/interfaces/JsonOpenSpec.d.ts +9 -0
  797. package/lib/types/interfaces/JsonSchemaOptions.d.ts +26 -0
  798. package/lib/types/interfaces/index.d.ts +4 -0
  799. package/lib/types/registries/JsonSchemaMapperContainer.d.ts +18 -0
  800. package/lib/types/utils/buildPath.d.ts +6 -0
  801. package/lib/types/utils/concatParameters.d.ts +4 -0
  802. package/lib/types/utils/concatPath.d.ts +1 -0
  803. package/lib/types/utils/defineStatusModel.d.ts +3 -0
  804. package/lib/types/utils/from.d.ts +189 -0
  805. package/lib/types/utils/generics.d.ts +50 -0
  806. package/lib/types/utils/getComputedType.d.ts +5 -0
  807. package/lib/types/utils/getInheritedStores.d.ts +8 -0
  808. package/lib/types/utils/getJsonEntityStore.d.ts +19 -0
  809. package/lib/types/utils/getJsonPathParameters.d.ts +7 -0
  810. package/lib/types/utils/getJsonSchema.d.ts +4 -0
  811. package/lib/types/utils/getJsonType.d.ts +5 -0
  812. package/lib/types/utils/getOperationsRoutes.d.ts +8 -0
  813. package/lib/types/utils/getOperationsStores.d.ts +6 -0
  814. package/lib/types/utils/getPropertiesStores.d.ts +20 -0
  815. package/lib/types/utils/getRequiredProperties.d.ts +6 -0
  816. package/lib/types/utils/getSpec.d.ts +49 -0
  817. package/lib/types/utils/isJsonClass.d.ts +4 -0
  818. package/lib/types/utils/isSuccessStatus.d.ts +2 -0
  819. package/lib/types/utils/mapHeaders.d.ts +9 -0
  820. package/lib/types/utils/mapNullableType.d.ts +3 -0
  821. package/lib/types/utils/mapRouteOptions.d.ts +5 -0
  822. package/lib/types/utils/matchGroups.d.ts +4 -0
  823. package/lib/types/utils/mergeOperation.d.ts +17 -0
  824. package/lib/types/utils/mergeSpec.d.ts +23 -0
  825. package/lib/types/utils/operationIdFormatter.d.ts +4 -0
  826. package/lib/types/utils/ref.d.ts +14 -0
  827. package/lib/types/utils/toJsonMapCollection.d.ts +7 -0
  828. package/lib/types/utils/toJsonRegex.d.ts +5 -0
  829. package/package.json +16 -12
  830. package/tsconfig.compile.esm.json +23 -0
  831. package/lib/index.js +0 -8379
  832. package/lib/index.js.map +0 -1
  833. package/lib/index.modern.js +0 -8230
  834. package/lib/index.modern.js.map +0 -1
  835. package/lib/utils/mergeSpec.benchmark.d.ts +0 -1
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.anyMapper = void 0;
4
+ const JsonLazyRef_1 = require("../domain/JsonLazyRef");
5
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
6
+ const generics_1 = require("../utils/generics");
7
+ const ref_1 = require("../utils/ref");
8
+ function anyMapper(input, options = {}) {
9
+ options.schemas = options.schemas || {};
10
+ if (typeof input !== "object" || input === null) {
11
+ return input;
12
+ }
13
+ if (input instanceof JsonLazyRef_1.JsonLazyRef) {
14
+ return (0, JsonSchemaMapperContainer_1.execMapper)("lazyRef", input, options);
15
+ }
16
+ if ("toJSON" in input) {
17
+ const schema = input.toJSON((0, generics_1.mapGenericsOptions)(options));
18
+ return input.canRef ? (0, ref_1.toRef)(input, schema, options) : schema;
19
+ }
20
+ return (0, JsonSchemaMapperContainer_1.execMapper)("object", input, options);
21
+ }
22
+ exports.anyMapper = anyMapper;
23
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("any", anyMapper);
24
+ //# sourceMappingURL=anyMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anyMapper.js","sourceRoot":"","sources":["../../../src/components/anyMapper.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAElD,uFAA6F;AAC7F,gDAAqD;AACrD,sCAAmC;AAEnC,SAAgB,SAAS,CAAC,KAAU,EAAE,UAA6B,EAAE;IACnE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;IAExC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,YAAY,yBAAW,EAAE;QAChC,OAAO,IAAA,sCAAU,EAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,IAAI,QAAQ,IAAI,KAAK,EAAE;QACrB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;QAEzD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,WAAK,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAlBD,8BAkBC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions} from \"../utils/generics\";\nimport {toRef} from \"../utils/ref\";\n\nexport function anyMapper(input: any, options: JsonSchemaOptions = {}): any {\n options.schemas = options.schemas || {};\n\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", input, options);\n }\n\n if (\"toJSON\" in input) {\n const schema = input.toJSON(mapGenericsOptions(options));\n\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n\n return execMapper(\"object\", input, options);\n}\n\nregisterJsonSchemaMapper(\"any\", anyMapper);\n"]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.classMapper = void 0;
4
+ const JsonEntityStore_1 = require("../domain/JsonEntityStore");
5
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
6
+ const generics_1 = require("../utils/generics");
7
+ const ref_1 = require("../utils/ref");
8
+ function classMapper(value, options = {}) {
9
+ const store = JsonEntityStore_1.JsonEntityStore.from(value.class);
10
+ const name = (0, ref_1.createRefName)(store.schema.getName() || value.getName(), options);
11
+ if (value.hasGenerics) {
12
+ // Inline generic
13
+ const { type, properties, additionalProperties, items, ...props } = value.toJSON(options);
14
+ const schema = {
15
+ ...(0, JsonSchemaMapperContainer_1.execMapper)("any", store.schema, {
16
+ ...options,
17
+ ...(0, generics_1.popGenerics)(value),
18
+ root: false
19
+ }),
20
+ ...props
21
+ };
22
+ if (schema.title) {
23
+ const name = (0, ref_1.createRefName)(schema.title, options);
24
+ options.schemas[name] = schema;
25
+ delete schema.title;
26
+ return (0, ref_1.createRef)(name, value, options);
27
+ }
28
+ return schema;
29
+ }
30
+ if (options.schemas && !options.schemas[name]) {
31
+ options.schemas[name] = {}; // avoid infinite calls
32
+ options.schemas[name] = (0, JsonSchemaMapperContainer_1.execMapper)("any", store.schema, (0, generics_1.mapGenericsOptions)({
33
+ ...options,
34
+ root: false
35
+ }));
36
+ }
37
+ return (0, ref_1.createRef)(name, value, options);
38
+ }
39
+ exports.classMapper = classMapper;
40
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("class", classMapper);
41
+ //# sourceMappingURL=classMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classMapper.js","sourceRoot":"","sources":["../../../src/components/classMapper.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAG1D,uFAA6F;AAC7F,gDAAkE;AAClE,sCAAsD;AAEtD,SAAgB,WAAW,CAAC,KAAiB,EAAE,UAA6B,EAAE;IAC5E,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,IAAA,mBAAa,EAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAE/E,IAAI,KAAK,CAAC,WAAW,EAAE;QACrB,iBAAiB;QACjB,MAAM,EAAC,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAC,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACxF,MAAM,MAAM,GAAG;YACb,GAAG,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE;gBACjC,GAAG,OAAO;gBACV,GAAG,IAAA,sBAAW,EAAC,KAAK,CAAC;gBACrB,IAAI,EAAE,KAAK;aACZ,CAAC;YACF,GAAG,KAAK;SACT,CAAC;QAEF,IAAI,MAAM,CAAC,KAAK,EAAE;YAChB,MAAM,IAAI,GAAG,IAAA,mBAAa,EAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAClD,OAAO,CAAC,OAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YAChC,OAAO,MAAM,CAAC,KAAK,CAAC;YAEpB,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;SACxC;QAED,OAAO,MAAM,CAAC;KACf;IAED,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC7C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,uBAAuB;QACnD,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAA,sCAAU,EAChC,KAAK,EACL,KAAK,CAAC,MAAM,EACZ,IAAA,6BAAkB,EAAC;YACjB,GAAG,OAAO;YACV,IAAI,EAAE,KAAK;SACZ,CAAC,CACH,CAAC;KACH;IAED,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAxCD,kCAwCC;AAED,IAAA,oDAAwB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions, popGenerics} from \"../utils/generics\";\nimport {createRef, createRefName} from \"../utils/ref\";\n\nexport function classMapper(value: JsonSchema, options: JsonSchemaOptions = {}) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n\n if (value.hasGenerics) {\n // Inline generic\n const {type, properties, additionalProperties, items, ...props} = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", store.schema, {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n\n if (schema.title) {\n const name = createRefName(schema.title, options);\n options.schemas![name] = schema;\n delete schema.title;\n\n return createRef(name, value, options);\n }\n\n return schema;\n }\n\n if (options.schemas && !options.schemas[name]) {\n options.schemas[name] = {}; // avoid infinite calls\n options.schemas[name] = execMapper(\n \"any\",\n store.schema,\n mapGenericsOptions({\n ...options,\n root: false\n })\n );\n }\n\n return createRef(name, value, options);\n}\n\nregisterJsonSchemaMapper(\"class\", classMapper);\n"]}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.genericsMapper = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const JsonEntityStore_1 = require("../domain/JsonEntityStore");
6
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
7
+ const generics_1 = require("../utils/generics");
8
+ const getJsonType_1 = require("../utils/getJsonType");
9
+ /**
10
+ * @ignore
11
+ */
12
+ function genericsMapper(obj, options) {
13
+ const { generics } = options;
14
+ if (generics && obj.$ref) {
15
+ if (generics.has(obj.$ref)) {
16
+ let type = generics.get(obj.$ref);
17
+ if ((0, core_1.isPrimitiveClass)(type)) {
18
+ return {
19
+ type: (0, getJsonType_1.getJsonType)(type)
20
+ };
21
+ }
22
+ if (type === Date) {
23
+ return {
24
+ type: "string",
25
+ format: "date-time"
26
+ };
27
+ }
28
+ if (type.toJSON) {
29
+ return type.toJSON({
30
+ ...options,
31
+ generics: undefined
32
+ });
33
+ }
34
+ if (type === Object) {
35
+ return {
36
+ type: "object"
37
+ };
38
+ }
39
+ if ((0, core_1.isClass)(type)) {
40
+ const model = {
41
+ class: type
42
+ };
43
+ if (options.nestedGenerics.length === 0) {
44
+ return (0, JsonSchemaMapperContainer_1.execMapper)("class", model, {
45
+ ...options,
46
+ generics: undefined
47
+ });
48
+ }
49
+ const store = JsonEntityStore_1.JsonEntityStore.from(model.class);
50
+ return (0, JsonSchemaMapperContainer_1.execMapper)("schema", store.schema, {
51
+ ...options,
52
+ ...(0, generics_1.popGenerics)(options),
53
+ root: false
54
+ });
55
+ }
56
+ }
57
+ }
58
+ return obj;
59
+ }
60
+ exports.genericsMapper = genericsMapper;
61
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("generics", genericsMapper);
62
+ //# sourceMappingURL=genericsMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genericsMapper.js","sourceRoot":"","sources":["../../../src/components/genericsMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAqD;AACrD,+DAA0D;AAC1D,uFAA6F;AAC7F,gDAA+D;AAC/D,sDAAiD;AAEjD;;GAEG;AACH,SAAgB,cAAc,CAAC,GAAQ,EAAE,OAAwB;IAC/D,MAAM,EAAC,QAAQ,EAAC,GAAG,OAAO,CAAC;IAE3B,IAAI,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE;QACxB,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC1B,IAAI,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAElC,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;gBAC1B,OAAO;oBACL,IAAI,EAAE,IAAA,yBAAW,EAAC,IAAI,CAAC;iBACxB,CAAC;aACH;YAED,IAAI,IAAI,KAAK,IAAI,EAAE;gBACjB,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,WAAW;iBACpB,CAAC;aACH;YAED,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,OAAO,IAAI,CAAC,MAAM,CAAC;oBACjB,GAAG,OAAO;oBACV,QAAQ,EAAE,SAAS;iBACpB,CAAC,CAAC;aACJ;YAED,IAAI,IAAI,KAAK,MAAM,EAAE;gBACnB,OAAO;oBACL,IAAI,EAAE,QAAQ;iBACf,CAAC;aACH;YAED,IAAI,IAAA,cAAO,EAAC,IAAI,CAAC,EAAE;gBACjB,MAAM,KAAK,GAAG;oBACZ,KAAK,EAAE,IAAI;iBACZ,CAAC;gBAEF,IAAI,OAAO,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvC,OAAO,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAY,EAAE;wBACvC,GAAG,OAAO;wBACV,QAAQ,EAAE,SAAS;qBACpB,CAAC,CAAC;iBACJ;gBAED,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAEhD,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE;oBACxC,GAAG,OAAO;oBACV,GAAG,IAAA,sBAAW,EAAC,OAAO,CAAC;oBACvB,IAAI,EAAE,KAAK;iBACZ,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAzDD,wCAyDC;AAED,IAAA,oDAAwB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {isClass, isPrimitiveClass} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {GenericsContext, popGenerics} from \"../utils/generics\";\nimport {getJsonType} from \"../utils/getJsonType\";\n\n/**\n * @ignore\n */\nexport function genericsMapper(obj: any, options: GenericsContext) {\n const {generics} = options;\n\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n\n if (isClass(type)) {\n const model = {\n class: type\n };\n\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", model as any, {\n ...options,\n generics: undefined\n });\n }\n\n const store = JsonEntityStore.from(model.class);\n\n return execMapper(\"schema\", store.schema, {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n"]}
File without changes
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./anyMapper"), exports);
5
+ (0, tslib_1.__exportStar)(require("./classMapper"), exports);
6
+ (0, tslib_1.__exportStar)(require("./genericsMapper"), exports);
7
+ (0, tslib_1.__exportStar)(require("./inheritedClassMapper"), exports);
8
+ (0, tslib_1.__exportStar)(require("./itemMapper"), exports);
9
+ (0, tslib_1.__exportStar)(require("./lazyRefMapper"), exports);
10
+ (0, tslib_1.__exportStar)(require("./mapMapper"), exports);
11
+ (0, tslib_1.__exportStar)(require("./objectMapper"), exports);
12
+ (0, tslib_1.__exportStar)(require("./schemaMapper"), exports);
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,2DAA4B;AAC5B,6DAA8B;AAC9B,gEAAiC;AACjC,sEAAuC;AACvC,4DAA6B;AAC7B,+DAAgC;AAChC,2DAA4B;AAC5B,8DAA+B;AAC/B,8DAA+B","sourcesContent":["export * from \"./anyMapper\";\nexport * from \"./classMapper\";\nexport * from \"./genericsMapper\";\nexport * from \"./inheritedClassMapper\";\nexport * from \"./itemMapper\";\nexport * from \"./lazyRefMapper\";\nexport * from \"./mapMapper\";\nexport * from \"./objectMapper\";\nexport * from \"./schemaMapper\";\n"]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inheritedClassMapper = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
6
+ const getInheritedStores_1 = require("../utils/getInheritedStores");
7
+ /**
8
+ * @ignore
9
+ */
10
+ function inheritedClassMapper(obj, { target, ...options } = {}) {
11
+ const stores = Array.from((0, getInheritedStores_1.getInheritedStores)(target).entries()).filter(([model]) => (0, core_1.classOf)(model) !== (0, core_1.classOf)(target));
12
+ if (stores.length) {
13
+ const schema = stores.reduce((obj, [, store]) => {
14
+ return (0, core_1.deepMerge)(obj, (0, JsonSchemaMapperContainer_1.execMapper)("schema", store.schema, options));
15
+ }, {});
16
+ obj = (0, core_1.deepMerge)(schema, obj);
17
+ }
18
+ return obj;
19
+ }
20
+ exports.inheritedClassMapper = inheritedClassMapper;
21
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("inheritedClass", inheritedClassMapper);
22
+ //# sourceMappingURL=inheritedClassMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inheritedClassMapper.js","sourceRoot":"","sources":["../../../src/components/inheritedClassMapper.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAE9C,uFAA6F;AAC7F,oEAA+D;AAE/D;;GAEG;AACH,SAAgB,oBAAoB,CAAC,GAAQ,EAAE,EAAC,MAAM,EAAE,GAAG,OAAO,KAAuB,EAAE;IACzF,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,KAAK,CAAC,KAAK,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC,CAAC;IAExH,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9C,OAAO,IAAA,gBAAS,EAAC,GAAG,EAAE,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACrE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,GAAG,GAAG,IAAA,gBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAZD,oDAYC;AAED,IAAA,oDAAwB,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import {classOf, deepMerge} from \"@tsed/core\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getInheritedStores} from \"../utils/getInheritedStores\";\n\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj: any, {target, ...options}: JsonSchemaOptions = {}) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", store.schema, options));\n }, {});\n\n obj = deepMerge(schema, obj);\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n"]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.itemMapper = void 0;
4
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
5
+ function itemMapper(value, options) {
6
+ return value && value.isClass ? (0, JsonSchemaMapperContainer_1.execMapper)("class", value, options) : (0, JsonSchemaMapperContainer_1.execMapper)("any", value, options);
7
+ }
8
+ exports.itemMapper = itemMapper;
9
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("item", itemMapper);
10
+ //# sourceMappingURL=itemMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itemMapper.js","sourceRoot":"","sources":["../../../src/components/itemMapper.ts"],"names":[],"mappings":";;;AACA,uFAA6F;AAE7F,SAAgB,UAAU,CAAC,KAAU,EAAE,OAA0B;IAC/D,OAAO,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1G,CAAC;AAFD,gCAEC;AAED,IAAA,oDAAwB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\nexport function itemMapper(value: any, options: JsonSchemaOptions) {\n return value && value.isClass ? execMapper(\"class\", value, options) : execMapper(\"any\", value, options);\n}\n\nregisterJsonSchemaMapper(\"item\", itemMapper);\n"]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lazyRefMapper = void 0;
4
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
5
+ const generics_1 = require("../utils/generics");
6
+ const ref_1 = require("../utils/ref");
7
+ function lazyRefMapper(input, options) {
8
+ var _a;
9
+ const name = input.name;
10
+ if ((_a = options.$refs) === null || _a === void 0 ? void 0 : _a.find((t) => t === input.target)) {
11
+ return (0, ref_1.createRef)(name, input.schema, options);
12
+ }
13
+ options.$refs = [...(options.$refs || []), input.target];
14
+ const schema = input.toJSON((0, generics_1.mapGenericsOptions)(options));
15
+ return (0, ref_1.toRef)(input.schema, schema, options);
16
+ }
17
+ exports.lazyRefMapper = lazyRefMapper;
18
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("lazyRef", lazyRefMapper);
19
+ //# sourceMappingURL=lazyRefMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazyRefMapper.js","sourceRoot":"","sources":["../../../src/components/lazyRefMapper.ts"],"names":[],"mappings":";;;AAEA,uFAAiF;AACjF,gDAAqD;AACrD,sCAA8C;AAE9C,SAAgB,aAAa,CAAC,KAAkB,EAAE,OAA0B;;IAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAExB,IAAI,MAAA,OAAO,CAAC,KAAK,0CAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;IAEzD,OAAO,IAAA,WAAK,EAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAZD,sCAYC;AAED,IAAA,oDAAwB,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions} from \"../utils/generics\";\nimport {createRef, toRef} from \"../utils/ref\";\n\nexport function lazyRefMapper(input: JsonLazyRef, options: JsonSchemaOptions) {\n const name = input.name;\n\n if (options.$refs?.find((t: any) => t === input.target)) {\n return createRef(name, input.schema, options);\n }\n\n options.$refs = [...(options.$refs || []), input.target];\n\n const schema = input.toJSON(mapGenericsOptions(options));\n\n return toRef(input.schema, schema, options);\n}\n\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n"]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapMapper = void 0;
4
+ const generics_1 = require("../utils/generics");
5
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
6
+ /**
7
+ * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.
8
+ * @param input
9
+ * @param ignore
10
+ * @param options
11
+ * @ignore
12
+ */
13
+ function mapMapper(input, { ignore = [], ...options } = {}) {
14
+ options = (0, generics_1.mapGenericsOptions)(options);
15
+ return Array.from(input.entries()).reduce((obj, [key, value]) => {
16
+ if (ignore.includes(key)) {
17
+ return obj;
18
+ }
19
+ obj[key] = (0, JsonSchemaMapperContainer_1.execMapper)("item", value, options);
20
+ return obj;
21
+ }, {});
22
+ }
23
+ exports.mapMapper = mapMapper;
24
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("map", mapMapper);
25
+ //# sourceMappingURL=mapMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapMapper.js","sourceRoot":"","sources":["../../../src/components/mapMapper.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAErD,uFAA6F;AAE7F;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAuB,EAAE,EAAC,MAAM,GAAG,EAAE,EAAE,GAAG,OAAO,KAAuB,EAAE;IAClG,OAAO,GAAG,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC;IAEtC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACnE,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,OAAO,GAAG,CAAC;SACZ;QAED,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAXD,8BAWC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {mapGenericsOptions} from \"../utils/generics\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input: Map<string, any>, {ignore = [], ...options}: JsonSchemaOptions = {}): any {\n options = mapGenericsOptions(options);\n\n return Array.from(input.entries()).reduce((obj: any, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n\n obj[key] = execMapper(\"item\", value, options);\n return obj;\n }, {});\n}\n\nregisterJsonSchemaMapper(\"map\", mapMapper);\n"]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.objectMapper = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const alterIgnore_1 = require("../hooks/alterIgnore");
6
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
7
+ /**
8
+ * Serialize Any object to a json schema
9
+ * @param input
10
+ * @param options
11
+ * @ignore
12
+ */
13
+ function objectMapper(input, options) {
14
+ const { specType, operationIdFormatter, root, schemas, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx } = options;
15
+ return Object.entries(input).reduce((obj, [key, value]) => {
16
+ if (options.withIgnoredProps !== false && !(0, alterIgnore_1.alterIgnore)(value, ctx)) {
17
+ // remove groups to avoid bad schema generation over children models
18
+ obj[key] = (0, JsonSchemaMapperContainer_1.execMapper)("item", value, { ...options, groups: (value === null || value === void 0 ? void 0 : value.$forwardGroups) ? options.groups : undefined });
19
+ }
20
+ return obj;
21
+ }, (0, core_1.isArray)(input) ? [] : {});
22
+ }
23
+ exports.objectMapper = objectMapper;
24
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("object", objectMapper);
25
+ //# sourceMappingURL=objectMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectMapper.js","sourceRoot":"","sources":["../../../src/components/objectMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC,sDAAiD;AAEjD,uFAA6F;AAE7F;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAU,EAAE,OAA0B;IACjE,MAAM,EAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,GAAG,EAAC,GAAG,OAAO,CAAC;IAE/H,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CACjC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAA6B,EAAE,EAAE;QAChD,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,IAAI,CAAC,IAAA,yBAAW,EAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YAClE,oEAAoE;YACpE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,EAAC,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAC,CAAC,CAAC;SAChH;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EACD,IAAA,cAAO,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CACzB,CAAC;AACJ,CAAC;AAdD,oCAcC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import {isArray} from \"@tsed/core\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {alterIgnore} from \"../hooks/alterIgnore\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input: any, options: JsonSchemaOptions) {\n const {specType, operationIdFormatter, root, schemas, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx} = options;\n\n return Object.entries(input).reduce<any>(\n (obj, [key, value]: [string, any | JsonSchema]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", value, {...options, groups: value?.$forwardGroups ? options.groups : undefined});\n }\n\n return obj;\n },\n isArray(input) ? [] : {}\n );\n}\n\nregisterJsonSchemaMapper(\"object\", objectMapper);\n"]}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schemaMapper = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const JsonAliasMap_1 = require("../domain/JsonAliasMap");
6
+ const SpecTypes_1 = require("../domain/SpecTypes");
7
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
8
+ const getRequiredProperties_1 = require("../utils/getRequiredProperties");
9
+ const mapNullableType_1 = require("../utils/mapNullableType");
10
+ /**
11
+ * @ignore
12
+ */
13
+ const IGNORES = ["name", "$required", "$hooks", "_nestedGenerics", SpecTypes_1.SpecTypes.OPENAPI, SpecTypes_1.SpecTypes.SWAGGER, SpecTypes_1.SpecTypes.JSON];
14
+ /**
15
+ * @ignore
16
+ */
17
+ const IGNORES_OPENSPEC = ["const"];
18
+ const IGNORES_OS2 = ["writeOnly", "readOnly"];
19
+ /**
20
+ * @ignore
21
+ */
22
+ function isEmptyProperties(key, value) {
23
+ return typeof value === "object" && ["items", "properties", "additionalProperties"].includes(key) && Object.keys(value).length === 0;
24
+ }
25
+ /**
26
+ * @ignore
27
+ */
28
+ function shouldMapAlias(key, value, useAlias) {
29
+ return typeof value === "object" && useAlias && ["properties", "additionalProperties"].includes(key);
30
+ }
31
+ /**
32
+ * @ignore
33
+ */
34
+ function shouldSkipKey(key, { specType = SpecTypes_1.SpecTypes.JSON, customKeys = false }) {
35
+ return (IGNORES.includes(key) ||
36
+ (key.startsWith("#") && (customKeys === false || specType !== SpecTypes_1.SpecTypes.JSON)) ||
37
+ (specType === SpecTypes_1.SpecTypes.SWAGGER && IGNORES_OS2.includes(key)) ||
38
+ (specType !== SpecTypes_1.SpecTypes.JSON && IGNORES_OPENSPEC.includes(key)));
39
+ }
40
+ function schemaMapper(schema, options = {}) {
41
+ const { useAlias = true, schemas = {}, genericTypes } = options;
42
+ let obj = [...schema.entries()].reduce((item, [key, value]) => {
43
+ if (shouldSkipKey(key, options)) {
44
+ return item;
45
+ }
46
+ key = key.replace(/^#/, "");
47
+ if (key === "type") {
48
+ value = schema.getJsonType();
49
+ }
50
+ if (key === "examples" && (0, core_1.isObject)(value) && [SpecTypes_1.SpecTypes.OPENAPI, SpecTypes_1.SpecTypes.SWAGGER].includes(options.specType)) {
51
+ key = "example";
52
+ value = Object.values(value)[0];
53
+ }
54
+ if (value) {
55
+ if (value.isClass) {
56
+ value = (0, JsonSchemaMapperContainer_1.execMapper)("class", value, {
57
+ ...options,
58
+ useAlias,
59
+ schemas
60
+ });
61
+ }
62
+ else {
63
+ value = (0, JsonSchemaMapperContainer_1.execMapper)("any", value, {
64
+ ...options,
65
+ useAlias,
66
+ schemas,
67
+ genericTypes,
68
+ genericLabels: schema.genericLabels
69
+ });
70
+ }
71
+ }
72
+ if (isEmptyProperties(key, value)) {
73
+ return item;
74
+ }
75
+ if (shouldMapAlias(key, value, useAlias)) {
76
+ value = (0, JsonAliasMap_1.mapAliasedProperties)(value, schema.alias);
77
+ }
78
+ item[key] = value;
79
+ return item;
80
+ }, {});
81
+ if (schema.isClass) {
82
+ obj = (0, JsonSchemaMapperContainer_1.execMapper)("inheritedClass", obj, { ...options, root: false, schemas, target: schema.getComputedType() });
83
+ }
84
+ obj = (0, JsonSchemaMapperContainer_1.execMapper)("generics", obj, { ...options, root: false, schemas });
85
+ if (schema.has(options.specType)) {
86
+ obj = {
87
+ ...obj,
88
+ ...schema.get(options.specType).toJSON(options)
89
+ };
90
+ }
91
+ obj = (0, getRequiredProperties_1.getRequiredProperties)(obj, schema, { ...options, useAlias });
92
+ obj = (0, mapNullableType_1.mapNullableType)(obj, schema, options);
93
+ if ((obj.oneOf || obj.allOf || obj.anyOf) && !(obj.items || obj.properties)) {
94
+ delete obj.type;
95
+ }
96
+ return obj;
97
+ }
98
+ exports.schemaMapper = schemaMapper;
99
+ (0, JsonSchemaMapperContainer_1.registerJsonSchemaMapper)("schema", schemaMapper);
100
+ //# sourceMappingURL=schemaMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaMapper.js","sourceRoot":"","sources":["../../../src/components/schemaMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AACpC,yDAA4D;AAE5D,mDAA8C;AAE9C,uFAA6F;AAC7F,0EAAqE;AACrE,8DAAyD;AAEzD;;GAEG;AACH,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,IAAI,CAAC,CAAC;AACzH;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,CAAC;AACnC,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAE9C;;GAEG;AACH,SAAS,iBAAiB,CAAC,GAAW,EAAE,KAAU;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvI,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,GAAW,EAAE,KAAU,EAAE,QAAiB;IAChE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvG,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,GAAW,EAAE,EAAC,QAAQ,GAAG,qBAAS,CAAC,IAAI,EAAE,UAAU,GAAG,KAAK,EAAoB;IACpG,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;QACrB,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,KAAK,IAAI,QAAQ,KAAK,qBAAS,CAAC,IAAI,CAAC,CAAC;QAC9E,CAAC,QAAQ,KAAK,qBAAS,CAAC,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC7D,CAAC,QAAQ,KAAK,qBAAS,CAAC,IAAI,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAChE,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAC,MAAkB,EAAE,UAA6B,EAAE;IAC9E,MAAM,EAAC,QAAQ,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,YAAY,EAAC,GAAG,OAAO,CAAC;IAE9D,IAAI,GAAG,GAAQ,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtE,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE;YAC/B,OAAO,IAAI,CAAC;SACb;QAED,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAE5B,IAAI,GAAG,KAAK,MAAM,EAAE;YAClB,KAAK,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;SAC9B;QAED,IAAI,GAAG,KAAK,UAAU,IAAI,IAAA,eAAQ,EAAC,KAAK,CAAC,IAAI,CAAC,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAS,CAAC,EAAE;YAC/G,GAAG,GAAG,SAAS,CAAC;YAChB,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACjC;QAED,IAAI,KAAK,EAAE;YACT,IAAI,KAAK,CAAC,OAAO,EAAE;gBACjB,KAAK,GAAG,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE;oBACjC,GAAG,OAAO;oBACV,QAAQ;oBACR,OAAO;iBACR,CAAC,CAAC;aACJ;iBAAM;gBACL,KAAK,GAAG,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE;oBAC/B,GAAG,OAAO;oBACV,QAAQ;oBACR,OAAO;oBACP,YAAY;oBACZ,aAAa,EAAE,MAAM,CAAC,aAAa;iBACpC,CAAC,CAAC;aACJ;SACF;QAED,IAAI,iBAAiB,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QAED,IAAI,cAAc,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE;YACxC,KAAK,GAAG,IAAA,mCAAoB,EAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAElB,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,MAAM,CAAC,OAAO,EAAE;QAClB,GAAG,GAAG,IAAA,sCAAU,EAAC,gBAAgB,EAAE,GAAG,EAAE,EAAC,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,EAAC,CAAC,CAAC;KAC/G;IAED,GAAG,GAAG,IAAA,sCAAU,EAAC,UAAU,EAAE,GAAG,EAAE,EAAC,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAQ,CAAC,CAAC;IAE7E,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,QAAkB,CAAC,EAAE;QAC1C,GAAG,GAAG;YACJ,GAAG,GAAG;YACN,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,QAAkB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;SAC1D,CAAC;KACH;IAED,GAAG,GAAG,IAAA,6CAAqB,EAAC,GAAG,EAAE,MAAM,EAAE,EAAC,GAAG,OAAO,EAAE,QAAQ,EAAC,CAAC,CAAC;IACjE,GAAG,GAAG,IAAA,iCAAe,EAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5C,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE;QAC3E,OAAO,GAAG,CAAC,IAAI,CAAC;KACjB;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAvED,oCAuEC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import {isObject} from \"@tsed/core\";\nimport {mapAliasedProperties} from \"../domain/JsonAliasMap\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getRequiredProperties} from \"../utils/getRequiredProperties\";\nimport {mapNullableType} from \"../utils/mapNullableType\";\n\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [\"const\"];\nconst IGNORES_OS2 = [\"writeOnly\", \"readOnly\"];\n\n/**\n * @ignore\n */\nfunction isEmptyProperties(key: string, value: any) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n\n/**\n * @ignore\n */\nfunction shouldMapAlias(key: string, value: any, useAlias: boolean) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n\n/**\n * @ignore\n */\nfunction shouldSkipKey(key: string, {specType = SpecTypes.JSON, customKeys = false}: JsonSchemaOptions) {\n return (\n IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType === SpecTypes.SWAGGER && IGNORES_OS2.includes(key)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key))\n );\n}\n\nexport function schemaMapper(schema: JsonSchema, options: JsonSchemaOptions = {}): any {\n const {useAlias = true, schemas = {}, genericTypes} = options;\n\n let obj: any = [...schema.entries()].reduce((item: any, [key, value]) => {\n if (shouldSkipKey(key, options)) {\n return item;\n }\n\n key = key.replace(/^#/, \"\");\n\n if (key === \"type\") {\n value = schema.getJsonType();\n }\n\n if (key === \"examples\" && isObject(value) && [SpecTypes.OPENAPI, SpecTypes.SWAGGER].includes(options.specType!)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n\n if (value) {\n if (value.isClass) {\n value = execMapper(\"class\", value, {\n ...options,\n useAlias,\n schemas\n });\n } else {\n value = execMapper(\"any\", value, {\n ...options,\n useAlias,\n schemas,\n genericTypes,\n genericLabels: schema.genericLabels\n });\n }\n }\n\n if (isEmptyProperties(key, value)) {\n return item;\n }\n\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n\n item[key] = value;\n\n return item;\n }, {});\n\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", obj, {...options, root: false, schemas, target: schema.getComputedType()});\n }\n\n obj = execMapper(\"generics\", obj, {...options, root: false, schemas} as any);\n\n if (schema.has(options.specType as string)) {\n obj = {\n ...obj,\n ...schema.get(options.specType as string).toJSON(options)\n };\n }\n\n obj = getRequiredProperties(obj, schema, {...options, useAlias});\n obj = mapNullableType(obj, schema, options);\n\n if ((obj.oneOf || obj.allOf || obj.anyOf) && !(obj.items || obj.properties)) {\n delete obj.type;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n"]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperationMethods = exports.HTTP_METHODS = void 0;
4
+ exports.HTTP_METHODS = [
5
+ "all",
6
+ "checkout",
7
+ "connect",
8
+ "copy",
9
+ "delete",
10
+ "get",
11
+ "head",
12
+ "lock",
13
+ "merge",
14
+ "mkactivity",
15
+ "mkcol",
16
+ "move",
17
+ "m-search",
18
+ "notify",
19
+ "options",
20
+ "param",
21
+ "patch",
22
+ "post",
23
+ "propfind",
24
+ "propatch",
25
+ "purge",
26
+ "put",
27
+ "report",
28
+ "search",
29
+ "subscribe",
30
+ "trace",
31
+ "unlock",
32
+ "unsuscribe"
33
+ ];
34
+ var OperationMethods;
35
+ (function (OperationMethods) {
36
+ OperationMethods["ALL"] = "ALL";
37
+ OperationMethods["GET"] = "GET";
38
+ OperationMethods["POST"] = "POST";
39
+ OperationMethods["PUT"] = "PUT";
40
+ OperationMethods["PATCH"] = "PATCH";
41
+ OperationMethods["HEAD"] = "HEAD";
42
+ OperationMethods["DELETE"] = "DELETE";
43
+ OperationMethods["OPTIONS"] = "OPTIONS";
44
+ OperationMethods["CUSTOM"] = "CUSTOM";
45
+ })(OperationMethods = exports.OperationMethods || (exports.OperationMethods = {}));
46
+ //# sourceMappingURL=httpMethods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpMethods.js","sourceRoot":"","sources":["../../../src/constants/httpMethods.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,UAAU;IACV,SAAS;IACT,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACZ,OAAO;IACP,MAAM;IACN,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,YAAY;CACb,CAAC;AAEF,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,iCAAa,CAAA;IACb,+BAAW,CAAA;IACX,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B","sourcesContent":["export const HTTP_METHODS = [\n \"all\",\n \"checkout\",\n \"connect\",\n \"copy\",\n \"delete\",\n \"get\",\n \"head\",\n \"lock\",\n \"merge\",\n \"mkactivity\",\n \"mkcol\",\n \"move\",\n \"m-search\",\n \"notify\",\n \"options\",\n \"param\",\n \"patch\",\n \"post\",\n \"propfind\",\n \"propatch\",\n \"purge\",\n \"put\",\n \"report\",\n \"search\",\n \"subscribe\",\n \"trace\",\n \"unlock\",\n \"unsuscribe\"\n];\n\nexport enum OperationMethods {\n ALL = \"ALL\", // special key\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n PATCH = \"PATCH\",\n HEAD = \"HEAD\",\n DELETE = \"DELETE\",\n OPTIONS = \"OPTIONS\",\n CUSTOM = \"CUSTOM\"\n}\n"]}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStatusMessage = exports.getStatusConstant = exports.HTTP_STATUS_MESSAGES = void 0;
4
+ exports.HTTP_STATUS_MESSAGES = {
5
+ "100": { label: "Continue", code: "CONTINUE" },
6
+ "101": { label: "Switching Protocols", code: "SWITCHING_PROTOCOLS" },
7
+ "102": { label: "Processing", code: "PROCESSING" },
8
+ "103": { label: "Early Hints", code: "EARLY_HINTS" },
9
+ "200": { label: "Success", code: "SUCCESS" },
10
+ "201": { label: "Created", code: "CREATED" },
11
+ "202": { label: "Accepted", code: "ACCEPTED" },
12
+ "203": {
13
+ label: "Non-Authoritative Information",
14
+ code: "NON_AUTHORITATIVE_INFORMATION"
15
+ },
16
+ "204": { label: "No Content", code: "NO_CONTENT" },
17
+ "205": { label: "Reset Content", code: "RESET_CONTENT" },
18
+ "206": { label: "Partial Content", code: "PARTIAL_CONTENT" },
19
+ "207": { label: "Multi-Status", code: "MULTI_STATUS" },
20
+ "208": { label: "Already Reported", code: "ALREADY_REPORTED" },
21
+ "226": { label: "IM Used", code: "IM_USED" },
22
+ "300": { label: "Multiple Choices", code: "MULTIPLE_CHOICES" },
23
+ "301": { label: "Moved Permanently", code: "MOVED_PERMANENTLY" },
24
+ "302": { label: "Found", code: "FOUND" },
25
+ "303": { label: "See Other", code: "SEE_OTHER" },
26
+ "304": { label: "Not Modified", code: "NOT_MODIFIED" },
27
+ "305": { label: "Use Proxy", code: "USE_PROXY" },
28
+ "306": { label: "(Unused)", code: "UNUSED" },
29
+ "307": { label: "Temporary Redirect", code: "TEMPORARY_REDIRECT" },
30
+ "308": { label: "Permanent Redirect", code: "PERMANENT_REDIRECT" },
31
+ "310": { label: "Too Many Redirects", code: "TOO_MANY_REDIRECTS" },
32
+ "400": { label: "Bad Request", code: "BAD_REQUEST" },
33
+ "401": { label: "Unauthorized", code: "UNAUTHORIZED" },
34
+ "402": { label: "Payment Required", code: "PAYMENT_REQUIRED" },
35
+ "403": { label: "Forbidden", code: "FORBIDDEN" },
36
+ "404": { label: "Not Found", code: "NOT_FOUND" },
37
+ "405": { label: "Method Not Allowed", code: "METHOD_NOT_ALLOWED" },
38
+ "406": { label: "Not Acceptable", code: "NOT_ACCEPTABLE" },
39
+ "407": {
40
+ label: "Proxy Authentication Required",
41
+ code: "PROXY_AUTHENTICATION_REQUIRED"
42
+ },
43
+ "408": { label: "Request Timeout", code: "REQUEST_TIMEOUT" },
44
+ "409": { label: "Conflict", code: "CONFLICT" },
45
+ "410": { label: "Gone", code: "GONE" },
46
+ "411": { label: "Length Required", code: "LENGTH_REQUIRED" },
47
+ "412": { label: "Precondition Failed", code: "PRECONDITION_FAILED" },
48
+ "413": {
49
+ label: "Request Entity Too Large",
50
+ code: "REQUEST_ENTITY_TOO_LARGE"
51
+ },
52
+ "414": { label: "Request URI Too Long", code: "REQUEST_URI_TOO_LONG" },
53
+ "415": { label: "Unsupported Media Type", code: "UNSUPPORTED_MEDIA_TYPE" },
54
+ "416": {
55
+ label: "Request Range Unsatisfiable",
56
+ code: "REQUEST_RANGE_UNSATISFIABLE"
57
+ },
58
+ "417": { label: "Expectation Failed", code: "EXPECTATION_FAILED" },
59
+ "418": { label: "I'm a Teapot", code: "I_M_A_TEAPOT" },
60
+ "421": { label: "Misdirected Request", code: "MISDIRECTED_REQUEST" },
61
+ "422": { label: "Unprocessable Entity", code: "UNPROCESSABLE_ENTITY" },
62
+ "423": { label: "Locked", code: "LOCKED" },
63
+ "424": { label: "Failed Dependency", code: "FAILED_DEPENDENCY" },
64
+ "425": { label: "Too Early", code: "TOO_EARLY" },
65
+ "426": { label: "Upgrade Required", code: "UPGRADE_REQUIRED" },
66
+ "427": { label: "Unassigned", code: "UNASSIGNED" },
67
+ "428": { label: "Precondition Required", code: "PRECONDITION_REQUIRED" },
68
+ "429": { label: "Too Many Requests", code: "TOO_MANY_REQUESTS" },
69
+ "430": { label: "Unassigned", code: "UNASSIGNED" },
70
+ "431": {
71
+ label: "Request Header Fields Too Large",
72
+ code: "REQUEST_HEADER_FIELDS_TOO_LARGE"
73
+ },
74
+ "451": {
75
+ label: "Unavailable For Legal Reasons",
76
+ code: "UNAVAILABLE_FOR_LEGAL_REASONS"
77
+ },
78
+ "500": { label: "Internal Server Error", code: "INTERNAL_SERVER_ERROR" },
79
+ "501": { label: "Not Implemented", code: "NOT_IMPLEMENTED" },
80
+ "502": { label: "Bad Gateway", code: "BAD_GATEWAY" },
81
+ "503": { label: "Service Unavailable", code: "SERVICE_UNAVAILABLE" },
82
+ "504": { label: "Gateway Timeout", code: "GATEWAY_TIMEOUT" },
83
+ "505": {
84
+ label: "HTTP Version Not Supported",
85
+ code: "HTTP_VERSION_NOT_SUPPORTED"
86
+ },
87
+ "506": { label: "Variant Also Negotiates", code: "VARIANT_ALSO_NEGOTIATES" },
88
+ "507": { label: "Insufficient Storage", code: "INSUFFICIENT_STORAGE" },
89
+ "508": { label: "Loop Detected", code: "LOOP_DETECTED" },
90
+ "509": {
91
+ label: "Bandwidth Limit Exceeded",
92
+ code: "BANDWIDTH_LIMIT_EXCEEDED"
93
+ },
94
+ "510": { label: "Not Extended", code: "NOT_EXTENDED" },
95
+ "511": {
96
+ label: "Network Authentication Required",
97
+ code: "NETWORK_AUTHENTICATION_REQUIRED"
98
+ }
99
+ };
100
+ function getStatusConstant(status) {
101
+ var _a;
102
+ return (_a = exports.HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.code;
103
+ }
104
+ exports.getStatusConstant = getStatusConstant;
105
+ function getStatusMessage(status) {
106
+ var _a;
107
+ return (_a = exports.HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.label;
108
+ }
109
+ exports.getStatusMessage = getStatusMessage;
110
+ //# sourceMappingURL=httpStatusMessages.js.map