@tsed/schema 6.88.0 → 6.91.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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +17 -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,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DecoratorContext = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const pascal_case_1 = require("pascal-case");
6
+ const JsonEntityStore_1 = require("./JsonEntityStore");
7
+ /**
8
+ * @ignore
9
+ */
10
+ class DecoratorContext extends Map {
11
+ constructor(opts = {}) {
12
+ super();
13
+ this.actions = [];
14
+ Object.entries(opts).forEach(([key, value]) => {
15
+ this.set(key, value);
16
+ });
17
+ }
18
+ addAction(cb) {
19
+ this.actions.push(cb);
20
+ return this;
21
+ }
22
+ build() {
23
+ const decorator = (...args) => this.bind(args, decorator);
24
+ const wrap = (cb) => {
25
+ return (...args) => {
26
+ cb(...args);
27
+ return decorator;
28
+ };
29
+ };
30
+ const wrapKey = (key) => {
31
+ return wrap((...values) => {
32
+ key in this ? this[key](...values) : this.set(key, values[0]);
33
+ });
34
+ };
35
+ this.methods.forEach((name) => {
36
+ decorator[(0, pascal_case_1.pascalCase)(name)] = wrapKey(name);
37
+ });
38
+ return decorator;
39
+ }
40
+ toObject() {
41
+ return [...this.entries()].reduce((obj, [key, value]) => {
42
+ return {
43
+ ...obj,
44
+ [key]: value
45
+ };
46
+ }, {});
47
+ }
48
+ getMergedKey(key, defaultValue) {
49
+ let value = this.get(key) || defaultValue;
50
+ if (!value) {
51
+ return;
52
+ }
53
+ if (this.decoratorType === core_1.DecoratorTypes.CLASS) {
54
+ value = {
55
+ ...value,
56
+ ...(defaultValue || {})
57
+ };
58
+ }
59
+ return {
60
+ ...(defaultValue || {}),
61
+ ...value
62
+ };
63
+ }
64
+ bind(args, decorator) {
65
+ this.entity = JsonEntityStore_1.JsonEntityStore.from(...args);
66
+ this.beforeInit();
67
+ this.onInit(args, decorator);
68
+ this.afterInit();
69
+ }
70
+ onInit(args, decorator) {
71
+ this.forEach((value, key) => {
72
+ this.onMapKey(key, value);
73
+ });
74
+ }
75
+ onMapKey(key, value) {
76
+ this.entity.set(key, value);
77
+ }
78
+ runActions() {
79
+ this.actions.forEach((action) => {
80
+ action(this);
81
+ });
82
+ return this;
83
+ }
84
+ beforeInit() { }
85
+ afterInit() { }
86
+ }
87
+ exports.DecoratorContext = DecoratorContext;
88
+ //# sourceMappingURL=DecoratorContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DecoratorContext.js","sourceRoot":"","sources":["../../../src/domain/DecoratorContext.ts"],"names":[],"mappings":";;;AAAA,qCAA+D;AAC/D,6CAAuC;AACvC,uDAAkD;AASlD;;GAEG;AACH,MAAsB,gBAA0B,SAAQ,GAAgB;IAMtE,YAAY,OAAY,EAAE;QACxB,KAAK,EAAE,CAAC;QAHA,YAAO,GAA6B,EAAE,CAAC;QAK/C,MAAM,CAAC,OAAO,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AAO,CAAC,OAAO,CAAC,CAAC,MAAW,EAAE,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IAES,UAAU,KAAI,CAAC;IAEf,SAAS,KAAI,CAAC;CACzB;AApGD,4CAoGC","sourcesContent":["import {DecoratorParameters, DecoratorTypes} from \"@tsed/core\";\nimport {pascalCase} from \"pascal-case\";\nimport {JsonEntityStore} from \"./JsonEntityStore\";\n\n/**\n * @ignore\n */\nexport interface DecoratorActionHandler {\n (ctx: Map<string, any>): void;\n}\n\n/**\n * @ignore\n */\nexport abstract class DecoratorContext<T = any> extends Map<string, any> {\n readonly methods: string[];\n protected decoratorType: DecoratorTypes;\n protected entity: JsonEntityStore;\n protected actions: DecoratorActionHandler[] = [];\n\n constructor(opts: any = {}) {\n super();\n\n Object.entries(opts).forEach(([key, value]) => {\n this.set(key, value);\n });\n }\n\n addAction(cb: DecoratorActionHandler) {\n this.actions.push(cb);\n return this;\n }\n\n build(): T {\n const decorator: any = (...args: DecoratorParameters) => this.bind(args, decorator);\n\n const wrap = (cb: any) => {\n return (...args: any[]) => {\n cb(...args);\n return decorator;\n };\n };\n\n const wrapKey = (key: string) => {\n return wrap((...values: any[]) => {\n key in this ? (this as any)[key](...values) : this.set(key, values[0]);\n });\n };\n\n this.methods.forEach((name) => {\n decorator[pascalCase(name)] = wrapKey(name);\n });\n\n return (decorator as unknown) as T;\n }\n\n toObject(): any {\n return [...this.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n\n getMergedKey(key: string, defaultValue: any) {\n let value = this.get(key) || defaultValue;\n\n if (!value) {\n return;\n }\n\n if (this.decoratorType === DecoratorTypes.CLASS) {\n value = {\n ...value,\n ...(defaultValue || {})\n };\n }\n\n return {\n ...(defaultValue || {}),\n ...value\n };\n }\n\n protected bind(args: DecoratorParameters, decorator: any) {\n this.entity = JsonEntityStore.from(...args);\n\n this.beforeInit();\n this.onInit(args, decorator);\n this.afterInit();\n }\n\n protected onInit(args: DecoratorParameters, decorator: any): void {\n this.forEach((value, key) => {\n this.onMapKey(key, value);\n });\n }\n\n protected onMapKey(key: string, value: any): void {\n this.entity.set(key, value);\n }\n\n protected runActions() {\n this.actions.forEach((action: any) => {\n action(this);\n });\n\n return this;\n }\n\n protected beforeInit() {}\n\n protected afterInit() {}\n}\n"]}
File without changes
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapAliasedProperties = void 0;
4
+ /**
5
+ * @ignore
6
+ */
7
+ function mapAliasedProperties(value, alias) {
8
+ return Object.entries(value).reduce((properties, [key, value]) => {
9
+ key = alias.get(key) || key;
10
+ properties[key] = value;
11
+ return properties;
12
+ }, {});
13
+ }
14
+ exports.mapAliasedProperties = mapAliasedProperties;
15
+ //# sourceMappingURL=JsonAliasMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonAliasMap.js","sourceRoot":"","sources":["../../../src/domain/JsonAliasMap.ts"],"names":[],"mappings":";;;AAQA;;GAEG;AACH,SAAgB,oBAAoB,CAAC,KAAU,EAAE,KAAe;IAC9D,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAM,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACpE,GAAG,GAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAY,IAAI,GAAG,CAAC;QACxC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAExB,OAAO,UAAU,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAPD,oDAOC","sourcesContent":["/**\n * @ignore\n */\nexport type AliasType = string | number | symbol;\n/**\n * @ignore\n */\nexport type AliasMap = Map<AliasType, AliasType>;\n/**\n * @ignore\n */\nexport function mapAliasedProperties(value: any, alias: AliasMap) {\n return Object.entries(value).reduce<any>((properties, [key, value]) => {\n key = (alias.get(key) as string) || key;\n properties[key] = value;\n\n return properties;\n }, {});\n}\n"]}
File without changes
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonClassStore = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@tsed/core");
6
+ const JsonEntityStore_1 = require("./JsonEntityStore");
7
+ const JsonSchema_1 = require("./JsonSchema");
8
+ const jsonEntityComponent_1 = require("../decorators/config/jsonEntityComponent");
9
+ let JsonClassStore = class JsonClassStore extends JsonEntityStore_1.JsonEntityStore {
10
+ constructor() {
11
+ super(...arguments);
12
+ /**
13
+ * List of children JsonEntityStore (properties or methods or params)
14
+ */
15
+ this.children = new Map();
16
+ }
17
+ get path() {
18
+ return this.store.get("path", "/");
19
+ }
20
+ set path(path) {
21
+ this.store.set("path", path);
22
+ }
23
+ build() {
24
+ if (!this._type) {
25
+ this.buildType(this.target);
26
+ }
27
+ this._type = this._type || Object;
28
+ this._schema = JsonSchema_1.JsonSchema.from({
29
+ type: this.type
30
+ });
31
+ }
32
+ };
33
+ JsonClassStore = (0, tslib_1.__decorate)([
34
+ (0, jsonEntityComponent_1.JsonEntityComponent)(core_1.DecoratorTypes.CLASS)
35
+ ], JsonClassStore);
36
+ exports.JsonClassStore = JsonClassStore;
37
+ //# sourceMappingURL=JsonClassStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonClassStore.js","sourceRoot":"","sources":["../../../src/domain/JsonClassStore.ts"],"names":[],"mappings":";;;;AAAA,qCAA0C;AAG1C,uDAA0E;AAC1E,6CAAwC;AACxC,kFAA6E;AAG7E,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,iCAAe;IAAnD;;QACE;;WAEG;QACM,aAAQ,GAA8D,IAAI,GAAG,EAAE,CAAC;IAqB3F,CAAC;IAnBC,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,IAAI,CAAC,IAAY;QACnB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IAES,KAAK;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC7B;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;QAElC,IAAI,CAAC,OAAO,GAAG,uBAAU,CAAC,IAAI,CAAC;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAzBY,cAAc;IAD1B,IAAA,yCAAmB,EAAC,qBAAc,CAAC,KAAK,CAAC;GAC7B,cAAc,CAyB1B;AAzBY,wCAAc","sourcesContent":["import {DecoratorTypes} from \"@tsed/core\";\nimport type {JsonMethodStore} from \"./JsonMethodStore\";\nimport type {JsonPropertyStore} from \"./JsonPropertyStore\";\nimport {JsonEntityStore, JsonEntityStoreOptions} from \"./JsonEntityStore\";\nimport {JsonSchema} from \"./JsonSchema\";\nimport {JsonEntityComponent} from \"../decorators/config/jsonEntityComponent\";\n\n@JsonEntityComponent(DecoratorTypes.CLASS)\nexport class JsonClassStore extends JsonEntityStore {\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n readonly children: Map<string | number, JsonMethodStore | JsonPropertyStore> = new Map();\n\n get path() {\n return this.store.get(\"path\", \"/\");\n }\n\n set path(path: string) {\n this.store.set(\"path\", path);\n }\n\n protected build() {\n if (!this._type) {\n this.buildType(this.target);\n }\n\n this._type = this._type || Object;\n\n this._schema = JsonSchema.from({\n type: this.type\n });\n }\n}\n"]}
File without changes
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonEntityStore = exports.JsonEntitiesContainer = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ /**
6
+ * @ignore
7
+ */
8
+ exports.JsonEntitiesContainer = new Map();
9
+ class JsonEntityStore {
10
+ constructor(options) {
11
+ this.isStore = true;
12
+ const { target, propertyKey, descriptor, index, decoratorType } = options;
13
+ this.target = target;
14
+ this.propertyKey = propertyKey;
15
+ this.propertyName = String(propertyKey);
16
+ this.descriptor = descriptor;
17
+ this.index = index;
18
+ this.decoratorType = decoratorType;
19
+ this.token = target;
20
+ this.store = options.store;
21
+ this.parent = this;
22
+ }
23
+ /**
24
+ * Return the class name of the entity.
25
+ * @returns {string}
26
+ */
27
+ get targetName() {
28
+ return (0, core_1.nameOf)(this.token);
29
+ }
30
+ /**
31
+ *
32
+ * @returns {boolean}
33
+ */
34
+ get isCollection() {
35
+ return !!this.collectionType;
36
+ }
37
+ /**
38
+ *
39
+ * @returns {boolean}
40
+ */
41
+ get isArray() {
42
+ return (0, core_1.isArrayOrArrayClass)(this.collectionType);
43
+ }
44
+ /**
45
+ *
46
+ * @returns {boolean}
47
+ */
48
+ get isPrimitive() {
49
+ return (0, core_1.isPrimitiveOrPrimitiveClass)(this._type);
50
+ }
51
+ /**
52
+ *
53
+ * @returns {boolean}
54
+ */
55
+ get isDate() {
56
+ return (0, core_1.isDate)(this.computedType);
57
+ }
58
+ /**
59
+ *
60
+ * @returns {boolean}
61
+ */
62
+ get isObject() {
63
+ return (0, core_1.isObject)(this.computedType);
64
+ }
65
+ /**
66
+ *
67
+ */
68
+ get isClass() {
69
+ return (0, core_1.isClass)(this.computedType);
70
+ }
71
+ /**
72
+ * Return the JsonSchema
73
+ */
74
+ get schema() {
75
+ return this._schema;
76
+ }
77
+ get nestedGenerics() {
78
+ return this.schema.nestedGenerics;
79
+ }
80
+ set nestedGenerics(nestedGenerics) {
81
+ this.schema.nestedGenerics = nestedGenerics;
82
+ }
83
+ /**
84
+ *
85
+ * @returns {Type<any>}
86
+ */
87
+ get type() {
88
+ return this._type;
89
+ }
90
+ /**
91
+ * Get original type without transformation
92
+ * @param value
93
+ */
94
+ set type(value) {
95
+ this._type = value;
96
+ this.build();
97
+ }
98
+ /**
99
+ * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to
100
+ * get the right type.
101
+ */
102
+ get computedType() {
103
+ return this.itemSchema.getComputedType();
104
+ }
105
+ get itemSchema() {
106
+ return this.isCollection ? this.schema.itemSchema() : this.schema;
107
+ }
108
+ get parentSchema() {
109
+ return this.parent.schema;
110
+ }
111
+ static from(...args) {
112
+ if (args[0].isStore) {
113
+ return args[0];
114
+ }
115
+ const target = args[0];
116
+ if (args.length > 1) {
117
+ args[0] = (0, core_1.prototypeOf)(args[0]);
118
+ }
119
+ const store = core_1.Store.from(...args);
120
+ if (!store.has("JsonEntityStore")) {
121
+ const decoratorType = (0, core_1.decoratorTypeOf)(args);
122
+ const entityStore = exports.JsonEntitiesContainer.get(decoratorType);
123
+ // istanbul ignore next
124
+ if (!entityStore) {
125
+ throw Error("Unsupported json entity type");
126
+ }
127
+ const jsonSchemaStore = new entityStore({
128
+ store,
129
+ decoratorType,
130
+ target: (0, core_1.classOf)(target),
131
+ propertyKey: args[1],
132
+ index: typeof args[2] === "number" ? args[2] : undefined,
133
+ descriptor: typeof args[2] === "object" ? args[2] : undefined
134
+ });
135
+ jsonSchemaStore.build();
136
+ store.set("JsonEntityStore", jsonSchemaStore);
137
+ }
138
+ return store.get("JsonEntityStore");
139
+ }
140
+ static fromMethod(target, propertyKey) {
141
+ return this.from(target, propertyKey, (0, core_1.descriptorOf)(target, propertyKey));
142
+ }
143
+ get(key, defaultValue) {
144
+ return this.store.get(key, defaultValue);
145
+ }
146
+ set(key, value) {
147
+ return this.store.set(key, value);
148
+ }
149
+ buildType(type) {
150
+ if ((0, core_1.isCollection)(type)) {
151
+ this.collectionType = type;
152
+ }
153
+ else {
154
+ this._type = type;
155
+ // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)
156
+ if (this._type && (0, core_1.isPlainObject)(this._type)) {
157
+ this._type = String;
158
+ }
159
+ }
160
+ }
161
+ }
162
+ exports.JsonEntityStore = JsonEntityStore;
163
+ //# sourceMappingURL=JsonEntityStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonEntityStore.js","sourceRoot":"","sources":["../../../src/domain/JsonEntityStore.ts"],"names":[],"mappings":";;;AAAA,qCAgBoB;AAOpB;;GAEG;AACU,QAAA,qBAAqB,GAAG,IAAI,GAAG,EAAyC,CAAC;AActF,MAAsB,eAAe;IAyCnC,YAAY,OAA+B;QAdlC,YAAO,GAAG,IAAI,CAAC;QAetB,MAAM,EAAC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAC,GAAG,OAAO,CAAC;QACxE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAY,CAAC;QAChC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAM,CAAC;QACpB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,IAAI,UAAU;QACZ,OAAO,IAAA,aAAM,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,IAAI,YAAY;QACd,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,IAAI,OAAO;QACT,OAAO,IAAA,0BAAmB,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACH,IAAI,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B,CAAE,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CAA8C,MAAW,EAAE,WAA4B;QACtG,OAAO,IAAI,CAAC,IAAI,CAAI,MAAM,EAAE,WAAW,EAAE,IAAA,mBAAY,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,GAAG,CAAU,GAAW,EAAE,YAAkB;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAI,GAAG,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAW;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAIS,SAAS,CAAC,IAAS;QAC3B,IAAI,IAAA,mBAAY,EAAC,IAAI,CAAC,EAAE;YACtB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;SAC5B;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAElB,wHAAwH;YACxH,IAAI,IAAI,CAAC,KAAK,IAAI,IAAA,oBAAa,EAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBAC3C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;aACrB;SACF;IACH,CAAC;CACF;AA3OD,0CA2OC","sourcesContent":["import {\n classOf,\n decoratorTypeOf,\n DecoratorTypes,\n descriptorOf,\n isArrayOrArrayClass,\n isClass,\n isCollection,\n isDate,\n isObject,\n isPlainObject,\n isPrimitiveOrPrimitiveClass,\n nameOf,\n prototypeOf,\n Store,\n Type\n} from \"@tsed/core\";\nimport type {JsonSchema} from \"./JsonSchema\";\nimport type {JsonMethodStore} from \"./JsonMethodStore\";\nimport type {JsonClassStore} from \"./JsonClassStore\";\nimport type {JsonPropertyStore} from \"./JsonPropertyStore\";\nimport type {JsonParameterStore} from \"./JsonParameterStore\";\n\n/**\n * @ignore\n */\nexport const JsonEntitiesContainer = new Map<DecoratorTypes, Type<JsonEntityStore>>();\n\nexport interface JsonEntityStoreOptions {\n decoratorType: DecoratorTypes;\n target: Type<any>;\n propertyKey?: string | symbol;\n index?: number;\n descriptor?: any;\n type?: Type<any>;\n collectionType?: Type<any>;\n\n [key: string]: any;\n}\n\nexport abstract class JsonEntityStore implements JsonEntityStoreOptions {\n /**\n * Original property key decorated by the decorator\n */\n readonly propertyKey: string | symbol;\n /**\n * Alias of the property\n */\n readonly propertyName: string;\n /**\n * Parameter index\n */\n readonly index: number;\n /**\n * Method's descriptor\n */\n readonly descriptor: number;\n /**\n * Decorator type used to declare the JsonSchemaStore.\n */\n readonly decoratorType: DecoratorTypes;\n /**\n * Type of the collection (Array, Map, Set, etc...)\n */\n public collectionType: Type<any>;\n public token: Type<any>;\n readonly store: Store;\n readonly isStore = true;\n readonly parent: JsonEntityStore;\n readonly target: Type<any>;\n /**\n *\n */\n protected _type: Type<any>;\n /**\n * Ref to JsonSchema\n */\n protected _schema: JsonSchema;\n\n [key: string]: any;\n\n constructor(options: JsonEntityStoreOptions) {\n const {target, propertyKey, descriptor, index, decoratorType} = options;\n this.target = target;\n this.propertyKey = propertyKey!;\n this.propertyName = String(propertyKey);\n this.descriptor = descriptor;\n this.index = index!;\n this.decoratorType = decoratorType;\n this.token = target;\n this.store = options.store;\n this.parent = this;\n }\n\n /**\n * Return the class name of the entity.\n * @returns {string}\n */\n get targetName(): string {\n return nameOf(this.token);\n }\n\n /**\n *\n * @returns {boolean}\n */\n get isCollection(): boolean {\n return !!this.collectionType;\n }\n\n /**\n *\n * @returns {boolean}\n */\n get isArray() {\n return isArrayOrArrayClass(this.collectionType);\n }\n\n /**\n *\n * @returns {boolean}\n */\n get isPrimitive() {\n return isPrimitiveOrPrimitiveClass(this._type);\n }\n\n /**\n *\n * @returns {boolean}\n */\n get isDate() {\n return isDate(this.computedType);\n }\n\n /**\n *\n * @returns {boolean}\n */\n get isObject() {\n return isObject(this.computedType);\n }\n\n /**\n *\n */\n get isClass() {\n return isClass(this.computedType);\n }\n\n /**\n * Return the JsonSchema\n */\n get schema(): JsonSchema {\n return this._schema;\n }\n\n get nestedGenerics(): Type<any>[][] {\n return this.schema.nestedGenerics;\n }\n\n set nestedGenerics(nestedGenerics: Type<any>[][]) {\n this.schema.nestedGenerics = nestedGenerics;\n }\n\n /**\n *\n * @returns {Type<any>}\n */\n get type(): Type<any> | any {\n return this._type;\n }\n\n /**\n * Get original type without transformation\n * @param value\n */\n set type(value: Type<any> | any) {\n this._type = value;\n this.build();\n }\n\n /**\n * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to\n * get the right type.\n */\n get computedType() {\n return this.itemSchema.getComputedType();\n }\n\n get itemSchema(): JsonSchema {\n return this.isCollection ? this.schema.itemSchema() : this.schema;\n }\n\n get parentSchema(): JsonSchema {\n return this.parent.schema;\n }\n\n /**\n *\n * @param target\n */\n static from<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;\n static from<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any, propertyKey: string | symbol): T;\n static from<T extends JsonParameterStore = JsonParameterStore>(target: Type<any> | any, propertyKey: string | symbol, index: number): T;\n static from<T extends JsonMethodStore = JsonMethodStore>(\n target: Type<any> | any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor\n ): T;\n static from<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T;\n static from<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T {\n if (args[0].isStore) {\n return args[0] as T;\n }\n\n const target = args[0];\n\n if (args.length > 1) {\n args[0] = prototypeOf(args[0]);\n }\n\n const store = Store.from(...args);\n\n if (!store.has(\"JsonEntityStore\")) {\n const decoratorType = decoratorTypeOf(args);\n const entityStore = JsonEntitiesContainer.get(decoratorType);\n\n // istanbul ignore next\n if (!entityStore) {\n throw Error(\"Unsupported json entity type\");\n }\n\n const jsonSchemaStore = new entityStore({\n store,\n decoratorType,\n target: classOf(target),\n propertyKey: args[1],\n index: typeof args[2] === \"number\" ? args[2] : undefined,\n descriptor: typeof args[2] === \"object\" ? args[2] : undefined\n });\n\n jsonSchemaStore.build();\n\n store.set(\"JsonEntityStore\", jsonSchemaStore);\n }\n\n return store.get<T>(\"JsonEntityStore\")!;\n }\n\n static fromMethod<T extends JsonMethodStore = JsonMethodStore>(target: any, propertyKey: string | symbol) {\n return this.from<T>(target, propertyKey, descriptorOf(target, propertyKey));\n }\n\n get<T = any>(key: string, defaultValue?: any) {\n return this.store.get<T>(key, defaultValue);\n }\n\n set(key: string, value?: any) {\n return this.store.set(key, value);\n }\n\n protected abstract build(): void;\n\n protected buildType(type: any) {\n if (isCollection(type)) {\n this.collectionType = type;\n } else {\n this._type = type;\n\n // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)\n if (this._type && isPlainObject(this._type)) {\n this._type = String;\n }\n }\n }\n}\n"]}
File without changes
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonFormatTypes = void 0;
4
+ var JsonFormatTypes;
5
+ (function (JsonFormatTypes) {
6
+ JsonFormatTypes["DATE_TIME"] = "date-time";
7
+ JsonFormatTypes["DATE"] = "date";
8
+ JsonFormatTypes["TIME"] = "time";
9
+ JsonFormatTypes["EMAIL"] = "email";
10
+ JsonFormatTypes["HOSTNAME"] = "hostname";
11
+ JsonFormatTypes["IPV4"] = "ipv4";
12
+ JsonFormatTypes["IPV6"] = "ipv6";
13
+ JsonFormatTypes["URI"] = "uri";
14
+ JsonFormatTypes["URL"] = "url";
15
+ JsonFormatTypes["URI_REF"] = "uri-reference";
16
+ JsonFormatTypes["URI_TEMPLATE"] = "uri-template";
17
+ JsonFormatTypes["JSON_POINTER"] = "json-pointer";
18
+ JsonFormatTypes["RELATIVE_JSON_POINTER"] = "relative-json-pointer";
19
+ JsonFormatTypes["UUID"] = "uuid";
20
+ JsonFormatTypes["REGEX"] = "regex";
21
+ })(JsonFormatTypes = exports.JsonFormatTypes || (exports.JsonFormatTypes = {}));
22
+ //# sourceMappingURL=JsonFormatTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonFormatTypes.js","sourceRoot":"","sources":["../../../src/domain/JsonFormatTypes.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAgBX;AAhBD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,8BAAW,CAAA;IACX,4CAAyB,CAAA;IACzB,gDAA6B,CAAA;IAC7B,gDAA6B,CAAA;IAC7B,kEAA+C,CAAA;IAC/C,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EAhBW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAgB1B","sourcesContent":["export enum JsonFormatTypes {\n DATE_TIME = \"date-time\",\n DATE = \"date\",\n TIME = \"time\",\n EMAIL = \"email\",\n HOSTNAME = \"hostname\",\n IPV4 = \"ipv4\",\n IPV6 = \"ipv6\",\n URI = \"uri\",\n URL = \"url\",\n URI_REF = \"uri-reference\",\n URI_TEMPLATE = \"uri-template\",\n JSON_POINTER = \"json-pointer\",\n RELATIVE_JSON_POINTER = \"relative-json-pointer\",\n UUID = \"uuid\",\n REGEX = \"regex\"\n}\n"]}
File without changes
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonLazyRef = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
6
+ const getJsonEntityStore_1 = require("../utils/getJsonEntityStore");
7
+ class JsonLazyRef {
8
+ constructor(getType) {
9
+ this.getType = getType;
10
+ this.isLazyRef = true;
11
+ }
12
+ get target() {
13
+ return this.getType();
14
+ }
15
+ get schema() {
16
+ return (0, getJsonEntityStore_1.getJsonEntityStore)(this.getType()).schema;
17
+ }
18
+ get name() {
19
+ return (0, core_1.nameOf)(this.getType());
20
+ }
21
+ toJSON(options) {
22
+ return this.getType() && (0, JsonSchemaMapperContainer_1.execMapper)("schema", this.schema, options);
23
+ }
24
+ }
25
+ exports.JsonLazyRef = JsonLazyRef;
26
+ //# sourceMappingURL=JsonLazyRef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonLazyRef.js","sourceRoot":"","sources":["../../../src/domain/JsonLazyRef.ts"],"names":[],"mappings":";;;AAAA,qCAAwC;AAExC,uFAAmE;AACnE,oEAA+D;AAE/D,MAAa,WAAW;IAGtB,YAAqB,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;QAFpC,cAAS,GAAG,IAAI,CAAC;IAEsB,CAAC;IAEjD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAA,uCAAkB,EAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;IACnD,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAA,aAAM,EAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,OAA2B;QAChC,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,IAAA,sCAAU,EAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;CACF;AApBD,kCAoBC","sourcesContent":["import {nameOf, Type} from \"@tsed/core\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getJsonEntityStore} from \"../utils/getJsonEntityStore\";\n\nexport class JsonLazyRef {\n readonly isLazyRef = true;\n\n constructor(readonly getType: () => Type<any>) {}\n\n get target() {\n return this.getType();\n }\n\n get schema() {\n return getJsonEntityStore(this.getType()).schema;\n }\n\n get name() {\n return nameOf(this.getType());\n }\n\n toJSON(options?: JsonSchemaOptions) {\n return this.getType() && execMapper(\"schema\", this.schema, options);\n }\n}\n"]}
File without changes
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonMap = void 0;
4
+ const core_1 = require("@tsed/core");
5
+ const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
6
+ class JsonMap extends Map {
7
+ constructor(obj = {}) {
8
+ super();
9
+ this.assign(obj);
10
+ }
11
+ assign(obj = {}) {
12
+ Object.entries(obj).forEach(([key, value]) => {
13
+ if ((0, core_1.isFunction)(this[key])) {
14
+ this[key](value);
15
+ }
16
+ else {
17
+ this.set(key, value);
18
+ }
19
+ });
20
+ return this;
21
+ }
22
+ toJSON(options = {}) {
23
+ return (0, JsonSchemaMapperContainer_1.execMapper)("map", this, options);
24
+ }
25
+ }
26
+ exports.JsonMap = JsonMap;
27
+ //# sourceMappingURL=JsonMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonMap.js","sourceRoot":"","sources":["../../../src/domain/JsonMap.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,uFAAmE;AAEnE,MAAa,OAAW,SAAQ,GAAgB;IAG9C,YAAY,MAAkB,EAAE;QAC9B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IAED,MAAM,CAAC,MAAwB,EAAE;QAC/B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC3C,IAAI,IAAA,iBAAU,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;gBACzB,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;aAClB;iBAAM;gBACL,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACtB;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,UAA6B,EAAE;QACpC,OAAO,IAAA,sCAAU,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAxBD,0BAwBC","sourcesContent":["import {isFunction} from \"@tsed/core\";\nimport {JsonSchemaOptions} from \"../interfaces\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer\";\n\nexport class JsonMap<T> extends Map<string, any> {\n [key: string]: any;\n\n constructor(obj: Partial<T> = {}) {\n super();\n\n this.assign(obj);\n }\n\n assign(obj: Partial<T> & any = {}) {\n Object.entries(obj).forEach(([key, value]) => {\n if (isFunction(this[key])) {\n this[key](value);\n } else {\n this.set(key, value);\n }\n });\n\n return this;\n }\n\n toJSON(options: JsonSchemaOptions = {}) {\n return execMapper(\"map\", this, options);\n }\n}\n"]}
File without changes
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonMethodStore = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@tsed/core");
6
+ const JsonEntityStore_1 = require("./JsonEntityStore");
7
+ const JsonOperation_1 = require("./JsonOperation");
8
+ const JsonSchema_1 = require("./JsonSchema");
9
+ const jsonEntityComponent_1 = require("../decorators/config/jsonEntityComponent");
10
+ let JsonMethodStore = class JsonMethodStore extends JsonEntityStore_1.JsonEntityStore {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.parent = JsonEntityStore_1.JsonEntityStore.from(this.target);
14
+ /**
15
+ * Ref to JsonOperation when the decorated object is a method.
16
+ */
17
+ this.operation = new JsonOperation_1.JsonOperation();
18
+ /**
19
+ * List of children JsonEntityStore (properties or methods or params)
20
+ */
21
+ this.children = new Map();
22
+ }
23
+ get parameters() {
24
+ return [...this.children.values()];
25
+ }
26
+ get operationPaths() {
27
+ return this.operation.operationPaths;
28
+ }
29
+ getResponseOptions(status, contentType = "application/json") {
30
+ var _a, _b;
31
+ const media = (_b = (_a = this.operation) === null || _a === void 0 ? void 0 : _a.getResponseOf(status)) === null || _b === void 0 ? void 0 : _b.getMedia(contentType, false);
32
+ if (media && media.has("schema")) {
33
+ const schema = media.get("schema");
34
+ return { type: schema.getComputedItemType(), groups: media.groups };
35
+ }
36
+ return { type: this.type };
37
+ }
38
+ build() {
39
+ if (!this._type) {
40
+ let type = core_1.Metadata.getReturnType(this.target, this.propertyKey);
41
+ type = (0, core_1.isPromise)(type) ? undefined : type;
42
+ this.buildType(type);
43
+ }
44
+ this._type = this._type || Object;
45
+ this.parent.children.set(this.propertyName, this);
46
+ if ((0, core_1.isCollection)(this._type)) {
47
+ this.collectionType = this._type;
48
+ // @ts-ignore
49
+ delete this._type;
50
+ }
51
+ this._schema = JsonSchema_1.JsonSchema.from({
52
+ type: this.collectionType || this.type
53
+ });
54
+ if (this.collectionType) {
55
+ this._schema.itemSchema(this.type);
56
+ }
57
+ this.parent.schema.addProperty(this.propertyName, this.schema);
58
+ }
59
+ };
60
+ JsonMethodStore = (0, tslib_1.__decorate)([
61
+ (0, jsonEntityComponent_1.JsonEntityComponent)(core_1.DecoratorTypes.METHOD)
62
+ ], JsonMethodStore);
63
+ exports.JsonMethodStore = JsonMethodStore;
64
+ //# sourceMappingURL=JsonMethodStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsonMethodStore.js","sourceRoot":"","sources":["../../../src/domain/JsonMethodStore.ts"],"names":[],"mappings":";;;;AAAA,qCAA6E;AAC7E,uDAAkD;AAClD,mDAA8C;AAC9C,6CAAwC;AAGxC,kFAA6E;AAG7E,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,iCAAe;IAApD;;QACW,WAAM,GAAmB,iCAAe,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEpE;;WAEG;QACM,cAAS,GAAkB,IAAI,6BAAa,EAAE,CAAC;QACxD;;WAEG;QACM,aAAQ,GAA6C,IA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AAI,CAAC,KAAK,CAAC,EAAE;YAC5B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC;YACjC,aAAa;YACb,OAAO,IAAI,CAAC,KAAK,CAAC;SACnB;QAED,IAAI,CAAC,OAAO,GAAG,uBAAU,CAAC,IAAI,CAAC;YAC7B,IAAI,EAAE,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,IAAI;SACvC,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACpC;QAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;CACF,CAAA;AA5DY,eAAe;IAD3B,IAAA,yCAAmB,EAAC,qBAAc,CAAC,MAAM,CAAC;GAC9B,eAAe,CA4D3B;AA5DY,0CAAe","sourcesContent":["import {DecoratorTypes, isCollection, isPromise, Metadata} from \"@tsed/core\";\nimport {JsonEntityStore} from \"./JsonEntityStore\";\nimport {JsonOperation} from \"./JsonOperation\";\nimport {JsonSchema} from \"./JsonSchema\";\nimport type {JsonParameterStore} from \"./JsonParameterStore\";\nimport type {JsonClassStore} from \"./JsonClassStore\";\nimport {JsonEntityComponent} from \"../decorators/config/jsonEntityComponent\";\n\n@JsonEntityComponent(DecoratorTypes.METHOD)\nexport class JsonMethodStore extends JsonEntityStore {\n readonly parent: JsonClassStore = JsonEntityStore.from(this.target);\n\n /**\n * Ref to JsonOperation when the decorated object is a method.\n */\n readonly operation: JsonOperation = new JsonOperation();\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n readonly children: Map<string | number, JsonParameterStore> = new Map();\n\n get parameters(): JsonParameterStore[] {\n return [...this.children.values()] as JsonParameterStore[];\n }\n\n get operationPaths() {\n return this.operation.operationPaths;\n }\n\n getResponseOptions(status: number, contentType: string = \"application/json\"): undefined | any {\n const media = this.operation?.getResponseOf(status)?.getMedia(contentType, false);\n\n if (media && media.has(\"schema\")) {\n const schema = media.get(\"schema\") as JsonSchema;\n\n return {type: schema.getComputedItemType(), groups: media.groups};\n }\n\n return {type: this.type};\n }\n\n protected build() {\n if (!this._type) {\n let type: any = Metadata.getReturnType(this.target, this.propertyKey);\n type = isPromise(type) ? undefined : type;\n\n this.buildType(type);\n }\n\n this._type = this._type || Object;\n\n this.parent.children.set(this.propertyName, this);\n\n if (isCollection(this._type)) {\n this.collectionType = this._type;\n // @ts-ignore\n delete this._type;\n }\n\n this._schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n\n if (this.collectionType) {\n this._schema.itemSchema(this.type);\n }\n\n this.parent.schema.addProperty(this.propertyName, this.schema);\n }\n}\n"]}
File without changes