@tsed/schema 7.0.0-alpha.2 → 7.0.0-beta.11

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 (767) hide show
  1. package/jest.config.js +14 -0
  2. package/lib/cjs/components/anyMapper.js +23 -0
  3. package/lib/cjs/components/anyMapper.js.map +1 -0
  4. package/lib/cjs/components/classMapper.js +41 -0
  5. package/lib/cjs/components/classMapper.js.map +1 -0
  6. package/lib/cjs/components/genericsMapper.js +62 -0
  7. package/lib/cjs/components/genericsMapper.js.map +1 -0
  8. package/lib/cjs/components/inheritedClassMapper.js +22 -0
  9. package/lib/cjs/components/inheritedClassMapper.js.map +1 -0
  10. package/lib/cjs/components/itemMapper.js +10 -0
  11. package/lib/cjs/components/itemMapper.js.map +1 -0
  12. package/lib/cjs/components/lazyRefMapper.js +19 -0
  13. package/lib/cjs/components/lazyRefMapper.js.map +1 -0
  14. package/lib/cjs/components/mapMapper.js +25 -0
  15. package/lib/cjs/components/mapMapper.js.map +1 -0
  16. package/lib/cjs/components/objectMapper.js +31 -0
  17. package/lib/cjs/components/objectMapper.js.map +1 -0
  18. package/lib/cjs/components/ofMapper.js +17 -0
  19. package/lib/cjs/components/ofMapper.js.map +1 -0
  20. package/lib/cjs/components/propertiesMapper.js +25 -0
  21. package/lib/cjs/components/propertiesMapper.js.map +1 -0
  22. package/lib/cjs/components/schemaMapper.js +95 -0
  23. package/lib/cjs/components/schemaMapper.js.map +1 -0
  24. package/lib/cjs/constants/httpMethods.js +46 -0
  25. package/lib/cjs/constants/httpMethods.js.map +1 -0
  26. package/lib/cjs/constants/httpStatusMessages.js +26 -0
  27. package/lib/cjs/constants/httpStatusMessages.js.map +1 -0
  28. package/lib/cjs/decorators/class/children.js +24 -0
  29. package/lib/cjs/decorators/class/children.js.map +1 -0
  30. package/lib/cjs/decorators/collections/collectionContains.js +29 -0
  31. package/lib/cjs/decorators/collections/collectionContains.js.map +1 -0
  32. package/lib/cjs/decorators/collections/collectionOf.js +103 -0
  33. package/lib/cjs/decorators/collections/collectionOf.js.map +1 -0
  34. package/lib/cjs/decorators/collections/maxItems.js +60 -0
  35. package/lib/cjs/decorators/collections/maxItems.js.map +1 -0
  36. package/lib/cjs/decorators/collections/maxProperties.js +83 -0
  37. package/lib/cjs/decorators/collections/maxProperties.js.map +1 -0
  38. package/lib/cjs/decorators/collections/minItems.js +64 -0
  39. package/lib/cjs/decorators/collections/minItems.js.map +1 -0
  40. package/lib/cjs/decorators/collections/minProperties.js +82 -0
  41. package/lib/cjs/decorators/collections/minProperties.js.map +1 -0
  42. package/lib/cjs/decorators/collections/uniqueItems.js +60 -0
  43. package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -0
  44. package/lib/cjs/decorators/common/additionalProperties.js +20 -0
  45. package/lib/cjs/decorators/common/additionalProperties.js.map +1 -0
  46. package/lib/cjs/decorators/common/allOf.js +22 -0
  47. package/lib/cjs/decorators/common/allOf.js.map +1 -0
  48. package/lib/cjs/decorators/common/allow.js +47 -0
  49. package/lib/cjs/decorators/common/allow.js.map +1 -0
  50. package/lib/cjs/decorators/common/any.js +46 -0
  51. package/lib/cjs/decorators/common/any.js.map +1 -0
  52. package/lib/cjs/decorators/common/anyOf.js +26 -0
  53. package/lib/cjs/decorators/common/anyOf.js.map +1 -0
  54. package/lib/cjs/decorators/common/const.js +70 -0
  55. package/lib/cjs/decorators/common/const.js.map +1 -0
  56. package/lib/cjs/decorators/common/customKey.js +43 -0
  57. package/lib/cjs/decorators/common/customKey.js.map +1 -0
  58. package/lib/cjs/decorators/common/default.js +51 -0
  59. package/lib/cjs/decorators/common/default.js.map +1 -0
  60. package/lib/cjs/decorators/common/description.js +76 -0
  61. package/lib/cjs/decorators/common/description.js.map +1 -0
  62. package/lib/cjs/decorators/common/enum.js +11 -0
  63. package/lib/cjs/decorators/common/enum.js.map +1 -0
  64. package/lib/cjs/decorators/common/example.js +21 -0
  65. package/lib/cjs/decorators/common/example.js.map +1 -0
  66. package/lib/cjs/decorators/common/examples.js +21 -0
  67. package/lib/cjs/decorators/common/examples.js.map +1 -0
  68. package/lib/cjs/decorators/common/exclusiveMaximum.js +77 -0
  69. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -0
  70. package/lib/cjs/decorators/common/exclusiveMinimum.js +77 -0
  71. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -0
  72. package/lib/cjs/decorators/common/format.js +486 -0
  73. package/lib/cjs/decorators/common/format.js.map +1 -0
  74. package/lib/cjs/decorators/common/forwardGroups.js +20 -0
  75. package/lib/cjs/decorators/common/forwardGroups.js.map +1 -0
  76. package/lib/cjs/decorators/common/groups.js +41 -0
  77. package/lib/cjs/decorators/common/groups.js.map +1 -0
  78. package/lib/cjs/decorators/common/hidden.js +40 -0
  79. package/lib/cjs/decorators/common/hidden.js.map +1 -0
  80. package/lib/cjs/decorators/common/ignore.js +71 -0
  81. package/lib/cjs/decorators/common/ignore.js.map +1 -0
  82. package/lib/cjs/decorators/common/integer.js +71 -0
  83. package/lib/cjs/decorators/common/integer.js.map +1 -0
  84. package/lib/cjs/decorators/common/jsonEntityFn.js +32 -0
  85. package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -0
  86. package/lib/cjs/decorators/common/maxLength.js +89 -0
  87. package/lib/cjs/decorators/common/maxLength.js.map +1 -0
  88. package/lib/cjs/decorators/common/maximum.js +151 -0
  89. package/lib/cjs/decorators/common/maximum.js.map +1 -0
  90. package/lib/cjs/decorators/common/minLength.js +90 -0
  91. package/lib/cjs/decorators/common/minLength.js.map +1 -0
  92. package/lib/cjs/decorators/common/minimum.js +149 -0
  93. package/lib/cjs/decorators/common/minimum.js.map +1 -0
  94. package/lib/cjs/decorators/common/multipleOf.js +81 -0
  95. package/lib/cjs/decorators/common/multipleOf.js.map +1 -0
  96. package/lib/cjs/decorators/common/name.js +52 -0
  97. package/lib/cjs/decorators/common/name.js.map +1 -0
  98. package/lib/cjs/decorators/common/nullable.js +34 -0
  99. package/lib/cjs/decorators/common/nullable.js.map +1 -0
  100. package/lib/cjs/decorators/common/oneOf.js +27 -0
  101. package/lib/cjs/decorators/common/oneOf.js.map +1 -0
  102. package/lib/cjs/decorators/common/optional.js +28 -0
  103. package/lib/cjs/decorators/common/optional.js.map +1 -0
  104. package/lib/cjs/decorators/common/pattern.js +103 -0
  105. package/lib/cjs/decorators/common/pattern.js.map +1 -0
  106. package/lib/cjs/decorators/common/property.js +27 -0
  107. package/lib/cjs/decorators/common/property.js.map +1 -0
  108. package/lib/cjs/decorators/common/readOnly.js +21 -0
  109. package/lib/cjs/decorators/common/readOnly.js.map +1 -0
  110. package/lib/cjs/decorators/common/recordOf.js +63 -0
  111. package/lib/cjs/decorators/common/recordOf.js.map +1 -0
  112. package/lib/cjs/decorators/common/required.js +53 -0
  113. package/lib/cjs/decorators/common/required.js.map +1 -0
  114. package/lib/cjs/decorators/common/requiredGroups.js +26 -0
  115. package/lib/cjs/decorators/common/requiredGroups.js.map +1 -0
  116. package/lib/cjs/decorators/common/schema.js +68 -0
  117. package/lib/cjs/decorators/common/schema.js.map +1 -0
  118. package/lib/cjs/decorators/common/title.js +49 -0
  119. package/lib/cjs/decorators/common/title.js.map +1 -0
  120. package/lib/cjs/decorators/common/writeOnly.js +21 -0
  121. package/lib/cjs/decorators/common/writeOnly.js.map +1 -0
  122. package/lib/cjs/decorators/config/jsonEntityComponent.js +18 -0
  123. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -0
  124. package/lib/cjs/decorators/generics/genericOf.js +99 -0
  125. package/lib/cjs/decorators/generics/genericOf.js.map +1 -0
  126. package/lib/cjs/decorators/generics/generics.js +25 -0
  127. package/lib/cjs/decorators/generics/generics.js.map +1 -0
  128. package/lib/cjs/decorators/operations/acceptMime.js +28 -0
  129. package/lib/cjs/decorators/operations/acceptMime.js.map +1 -0
  130. package/lib/cjs/decorators/operations/consumes.js +39 -0
  131. package/lib/cjs/decorators/operations/consumes.js.map +1 -0
  132. package/lib/cjs/decorators/operations/contentType.js +28 -0
  133. package/lib/cjs/decorators/operations/contentType.js.map +1 -0
  134. package/lib/cjs/decorators/operations/deprecated.js +43 -0
  135. package/lib/cjs/decorators/operations/deprecated.js.map +1 -0
  136. package/lib/cjs/decorators/operations/header.js +59 -0
  137. package/lib/cjs/decorators/operations/header.js.map +1 -0
  138. package/lib/cjs/decorators/operations/in.js +80 -0
  139. package/lib/cjs/decorators/operations/in.js.map +1 -0
  140. package/lib/cjs/decorators/operations/inFile.js +45 -0
  141. package/lib/cjs/decorators/operations/inFile.js.map +1 -0
  142. package/lib/cjs/decorators/operations/location.js +29 -0
  143. package/lib/cjs/decorators/operations/location.js.map +1 -0
  144. package/lib/cjs/decorators/operations/operationId.js +24 -0
  145. package/lib/cjs/decorators/operations/operationId.js.map +1 -0
  146. package/lib/cjs/decorators/operations/operationPath.js +34 -0
  147. package/lib/cjs/decorators/operations/operationPath.js.map +1 -0
  148. package/lib/cjs/decorators/operations/partial.js +18 -0
  149. package/lib/cjs/decorators/operations/partial.js.map +1 -0
  150. package/lib/cjs/decorators/operations/path.js +29 -0
  151. package/lib/cjs/decorators/operations/path.js.map +1 -0
  152. package/lib/cjs/decorators/operations/produces.js +46 -0
  153. package/lib/cjs/decorators/operations/produces.js.map +1 -0
  154. package/lib/cjs/decorators/operations/redirect.js +26 -0
  155. package/lib/cjs/decorators/operations/redirect.js.map +1 -0
  156. package/lib/cjs/decorators/operations/returns.js +252 -0
  157. package/lib/cjs/decorators/operations/returns.js.map +1 -0
  158. package/lib/cjs/decorators/operations/route.js +200 -0
  159. package/lib/cjs/decorators/operations/route.js.map +1 -0
  160. package/lib/cjs/decorators/operations/security.js +43 -0
  161. package/lib/cjs/decorators/operations/security.js.map +1 -0
  162. package/lib/cjs/decorators/operations/status.js +133 -0
  163. package/lib/cjs/decorators/operations/status.js.map +1 -0
  164. package/lib/cjs/decorators/operations/summary.js +34 -0
  165. package/lib/cjs/decorators/operations/summary.js.map +1 -0
  166. package/lib/cjs/decorators/operations/tags.js +52 -0
  167. package/lib/cjs/decorators/operations/tags.js.map +1 -0
  168. package/lib/cjs/decorators/operations/view.js +31 -0
  169. package/lib/cjs/decorators/operations/view.js.map +1 -0
  170. package/lib/cjs/domain/DecoratorContext.js +88 -0
  171. package/lib/cjs/domain/DecoratorContext.js.map +1 -0
  172. package/lib/cjs/domain/JsonAliasMap.js +15 -0
  173. package/lib/cjs/domain/JsonAliasMap.js.map +1 -0
  174. package/lib/cjs/domain/JsonClassStore.js +37 -0
  175. package/lib/cjs/domain/JsonClassStore.js.map +1 -0
  176. package/lib/cjs/domain/JsonEntityStore.js +166 -0
  177. package/lib/cjs/domain/JsonEntityStore.js.map +1 -0
  178. package/lib/cjs/domain/JsonFormatTypes.js +22 -0
  179. package/lib/cjs/domain/JsonFormatTypes.js.map +1 -0
  180. package/lib/cjs/domain/JsonLazyRef.js +26 -0
  181. package/lib/cjs/domain/JsonLazyRef.js.map +1 -0
  182. package/lib/cjs/domain/JsonMap.js +27 -0
  183. package/lib/cjs/domain/JsonMap.js.map +1 -0
  184. package/lib/cjs/domain/JsonMethodStore.js +143 -0
  185. package/lib/cjs/domain/JsonMethodStore.js.map +1 -0
  186. package/lib/cjs/domain/JsonOperation.js +235 -0
  187. package/lib/cjs/domain/JsonOperation.js.map +1 -0
  188. package/lib/cjs/domain/JsonOperationPathsMap.js +29 -0
  189. package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -0
  190. package/lib/cjs/domain/JsonOperationRoute.js +60 -0
  191. package/lib/cjs/domain/JsonOperationRoute.js.map +1 -0
  192. package/lib/cjs/domain/JsonParameter.js +119 -0
  193. package/lib/cjs/domain/JsonParameter.js.map +1 -0
  194. package/lib/cjs/domain/JsonParameterStore.js +99 -0
  195. package/lib/cjs/domain/JsonParameterStore.js.map +1 -0
  196. package/lib/cjs/domain/JsonParameterTypes.js +27 -0
  197. package/lib/cjs/domain/JsonParameterTypes.js.map +1 -0
  198. package/lib/cjs/domain/JsonPropertyStore.js +72 -0
  199. package/lib/cjs/domain/JsonPropertyStore.js.map +1 -0
  200. package/lib/cjs/domain/JsonRequestBody.js +32 -0
  201. package/lib/cjs/domain/JsonRequestBody.js.map +1 -0
  202. package/lib/cjs/domain/JsonResponse.js +76 -0
  203. package/lib/cjs/domain/JsonResponse.js.map +1 -0
  204. package/lib/cjs/domain/JsonSchema.js +716 -0
  205. package/lib/cjs/domain/JsonSchema.js.map +1 -0
  206. package/lib/cjs/domain/SpecTypes.js +10 -0
  207. package/lib/cjs/domain/SpecTypes.js.map +1 -0
  208. package/lib/cjs/hooks/alterIgnore.js +21 -0
  209. package/lib/cjs/hooks/alterIgnore.js.map +1 -0
  210. package/lib/cjs/hooks/alterOneOf.js +14 -0
  211. package/lib/cjs/hooks/alterOneOf.js.map +1 -0
  212. package/lib/cjs/hooks/alterRequiredGroups.js +15 -0
  213. package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -0
  214. package/lib/cjs/index.js +154 -0
  215. package/lib/cjs/index.js.map +1 -0
  216. package/lib/cjs/interfaces/IgnoreCallback.js +3 -0
  217. package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -0
  218. package/lib/cjs/interfaces/JsonHookContext.js +3 -0
  219. package/lib/cjs/interfaces/JsonHookContext.js.map +1 -0
  220. package/lib/cjs/interfaces/JsonOpenSpec.js +3 -0
  221. package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -0
  222. package/lib/cjs/interfaces/JsonSchemaOptions.js +3 -0
  223. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -0
  224. package/lib/cjs/package.json +3 -0
  225. package/lib/cjs/registries/JsonSchemaMapperContainer.js +37 -0
  226. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -0
  227. package/lib/cjs/utils/buildPath.js +13 -0
  228. package/lib/cjs/utils/buildPath.js.map +1 -0
  229. package/lib/cjs/utils/concatParameters.js +16 -0
  230. package/lib/cjs/utils/concatParameters.js.map +1 -0
  231. package/lib/cjs/utils/concatPath.js +8 -0
  232. package/lib/cjs/utils/concatPath.js.map +1 -0
  233. package/lib/cjs/utils/defineStatusModel.js +13 -0
  234. package/lib/cjs/utils/defineStatusModel.js.map +1 -0
  235. package/lib/cjs/utils/from.js +273 -0
  236. package/lib/cjs/utils/from.js.map +1 -0
  237. package/lib/cjs/utils/generateSpec.js +46 -0
  238. package/lib/cjs/utils/generateSpec.js.map +1 -0
  239. package/lib/cjs/utils/generics.js +40 -0
  240. package/lib/cjs/utils/generics.js.map +1 -0
  241. package/lib/cjs/utils/getComputedType.js +26 -0
  242. package/lib/cjs/utils/getComputedType.js.map +1 -0
  243. package/lib/cjs/utils/getInheritedStores.js +23 -0
  244. package/lib/cjs/utils/getInheritedStores.js.map +1 -0
  245. package/lib/cjs/utils/getJsonEntityStore.js +18 -0
  246. package/lib/cjs/utils/getJsonEntityStore.js.map +1 -0
  247. package/lib/cjs/utils/getJsonPathParameters.js +73 -0
  248. package/lib/cjs/utils/getJsonPathParameters.js.map +1 -0
  249. package/lib/cjs/utils/getJsonSchema.js +65 -0
  250. package/lib/cjs/utils/getJsonSchema.js.map +1 -0
  251. package/lib/cjs/utils/getJsonType.js +40 -0
  252. package/lib/cjs/utils/getJsonType.js.map +1 -0
  253. package/lib/cjs/utils/getOperationsRoutes.js +37 -0
  254. package/lib/cjs/utils/getOperationsRoutes.js.map +1 -0
  255. package/lib/cjs/utils/getOperationsStores.js +33 -0
  256. package/lib/cjs/utils/getOperationsStores.js.map +1 -0
  257. package/lib/cjs/utils/getPropertiesStores.js +45 -0
  258. package/lib/cjs/utils/getPropertiesStores.js.map +1 -0
  259. package/lib/cjs/utils/getRequiredProperties.js +66 -0
  260. package/lib/cjs/utils/getRequiredProperties.js.map +1 -0
  261. package/lib/cjs/utils/getSpec.js +102 -0
  262. package/lib/cjs/utils/getSpec.js.map +1 -0
  263. package/lib/cjs/utils/getSpecType.js +21 -0
  264. package/lib/cjs/utils/getSpecType.js.map +1 -0
  265. package/lib/cjs/utils/isSuccessStatus.js +8 -0
  266. package/lib/cjs/utils/isSuccessStatus.js.map +1 -0
  267. package/lib/cjs/utils/mapHeaders.js +29 -0
  268. package/lib/cjs/utils/mapHeaders.js.map +1 -0
  269. package/lib/cjs/utils/mapNullableType.js +44 -0
  270. package/lib/cjs/utils/mapNullableType.js.map +1 -0
  271. package/lib/cjs/utils/mapOpenSpec.js +41 -0
  272. package/lib/cjs/utils/mapOpenSpec.js.map +1 -0
  273. package/lib/cjs/utils/mapOpenSpec2.js +34 -0
  274. package/lib/cjs/utils/mapOpenSpec2.js.map +1 -0
  275. package/lib/cjs/utils/mapOpenSpec3.js +26 -0
  276. package/lib/cjs/utils/mapOpenSpec3.js.map +1 -0
  277. package/lib/cjs/utils/mapOpenSpecInfo.js +21 -0
  278. package/lib/cjs/utils/mapOpenSpecInfo.js.map +1 -0
  279. package/lib/cjs/utils/mapRouteOptions.js +26 -0
  280. package/lib/cjs/utils/mapRouteOptions.js.map +1 -0
  281. package/lib/cjs/utils/matchGroups.js +23 -0
  282. package/lib/cjs/utils/matchGroups.js.map +1 -0
  283. package/lib/cjs/utils/mergeOperation.js +45 -0
  284. package/lib/cjs/utils/mergeOperation.js.map +1 -0
  285. package/lib/cjs/utils/mergeSpec.js +46 -0
  286. package/lib/cjs/utils/mergeSpec.js.map +1 -0
  287. package/lib/cjs/utils/operationIdFormatter.js +37 -0
  288. package/lib/cjs/utils/operationIdFormatter.js.map +1 -0
  289. package/lib/cjs/utils/ref.js +65 -0
  290. package/lib/cjs/utils/ref.js.map +1 -0
  291. package/lib/cjs/utils/serializeEnumValues.js +26 -0
  292. package/lib/cjs/utils/serializeEnumValues.js.map +1 -0
  293. package/lib/cjs/utils/toJsonMapCollection.js +15 -0
  294. package/lib/cjs/utils/toJsonMapCollection.js.map +1 -0
  295. package/lib/cjs/utils/toJsonRegex.js +12 -0
  296. package/lib/cjs/utils/toJsonRegex.js.map +1 -0
  297. package/lib/cjs/utils/transformToOS2.js +510 -0
  298. package/lib/cjs/utils/transformToOS2.js.map +1 -0
  299. package/lib/esm/components/anyMapper.js +19 -0
  300. package/lib/esm/components/anyMapper.js.map +1 -0
  301. package/lib/esm/components/classMapper.js +37 -0
  302. package/lib/esm/components/classMapper.js.map +1 -0
  303. package/lib/esm/components/genericsMapper.js +58 -0
  304. package/lib/esm/components/genericsMapper.js.map +1 -0
  305. package/lib/esm/components/inheritedClassMapper.js +18 -0
  306. package/lib/esm/components/inheritedClassMapper.js.map +1 -0
  307. package/lib/esm/components/itemMapper.js +6 -0
  308. package/lib/esm/components/itemMapper.js.map +1 -0
  309. package/lib/esm/components/lazyRefMapper.js +15 -0
  310. package/lib/esm/components/lazyRefMapper.js.map +1 -0
  311. package/lib/esm/components/mapMapper.js +21 -0
  312. package/lib/esm/components/mapMapper.js.map +1 -0
  313. package/lib/esm/components/objectMapper.js +27 -0
  314. package/lib/esm/components/objectMapper.js.map +1 -0
  315. package/lib/esm/components/ofMapper.js +13 -0
  316. package/lib/esm/components/ofMapper.js.map +1 -0
  317. package/lib/esm/components/propertiesMapper.js +21 -0
  318. package/lib/esm/components/propertiesMapper.js.map +1 -0
  319. package/lib/esm/components/schemaMapper.js +91 -0
  320. package/lib/esm/components/schemaMapper.js.map +1 -0
  321. package/lib/esm/constants/httpMethods.js +43 -0
  322. package/lib/esm/constants/httpMethods.js.map +1 -0
  323. package/lib/esm/constants/httpStatusMessages.js +20 -0
  324. package/lib/esm/constants/httpStatusMessages.js.map +1 -0
  325. package/lib/esm/decorators/class/children.js +20 -0
  326. package/lib/esm/decorators/class/children.js.map +1 -0
  327. package/lib/esm/decorators/collections/collectionContains.js +25 -0
  328. package/lib/esm/decorators/collections/collectionContains.js.map +1 -0
  329. package/lib/esm/decorators/collections/collectionOf.js +97 -0
  330. package/lib/esm/decorators/collections/collectionOf.js.map +1 -0
  331. package/lib/esm/decorators/collections/maxItems.js +56 -0
  332. package/lib/esm/decorators/collections/maxItems.js.map +1 -0
  333. package/lib/esm/decorators/collections/maxProperties.js +79 -0
  334. package/lib/esm/decorators/collections/maxProperties.js.map +1 -0
  335. package/lib/esm/decorators/collections/minItems.js +60 -0
  336. package/lib/esm/decorators/collections/minItems.js.map +1 -0
  337. package/lib/esm/decorators/collections/minProperties.js +78 -0
  338. package/lib/esm/decorators/collections/minProperties.js.map +1 -0
  339. package/lib/esm/decorators/collections/uniqueItems.js +56 -0
  340. package/lib/esm/decorators/collections/uniqueItems.js.map +1 -0
  341. package/lib/esm/decorators/common/additionalProperties.js +16 -0
  342. package/lib/esm/decorators/common/additionalProperties.js.map +1 -0
  343. package/lib/esm/decorators/common/allOf.js +18 -0
  344. package/lib/esm/decorators/common/allOf.js.map +1 -0
  345. package/lib/esm/decorators/common/allow.js +43 -0
  346. package/lib/esm/decorators/common/allow.js.map +1 -0
  347. package/lib/esm/decorators/common/any.js +42 -0
  348. package/lib/esm/decorators/common/any.js.map +1 -0
  349. package/lib/esm/decorators/common/anyOf.js +22 -0
  350. package/lib/esm/decorators/common/anyOf.js.map +1 -0
  351. package/lib/esm/decorators/common/const.js +66 -0
  352. package/lib/esm/decorators/common/const.js.map +1 -0
  353. package/lib/esm/decorators/common/customKey.js +38 -0
  354. package/lib/esm/decorators/common/customKey.js.map +1 -0
  355. package/lib/esm/decorators/common/default.js +47 -0
  356. package/lib/esm/decorators/common/default.js.map +1 -0
  357. package/lib/esm/decorators/common/description.js +72 -0
  358. package/lib/esm/decorators/common/description.js.map +1 -0
  359. package/lib/esm/decorators/common/enum.js +7 -0
  360. package/lib/esm/decorators/common/enum.js.map +1 -0
  361. package/lib/esm/decorators/common/example.js +17 -0
  362. package/lib/esm/decorators/common/example.js.map +1 -0
  363. package/lib/esm/decorators/common/examples.js +17 -0
  364. package/lib/esm/decorators/common/examples.js.map +1 -0
  365. package/lib/esm/decorators/common/exclusiveMaximum.js +73 -0
  366. package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -0
  367. package/lib/esm/decorators/common/exclusiveMinimum.js +73 -0
  368. package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -0
  369. package/lib/esm/decorators/common/format.js +476 -0
  370. package/lib/esm/decorators/common/format.js.map +1 -0
  371. package/lib/esm/decorators/common/forwardGroups.js +16 -0
  372. package/lib/esm/decorators/common/forwardGroups.js.map +1 -0
  373. package/lib/esm/decorators/common/groups.js +37 -0
  374. package/lib/esm/decorators/common/groups.js.map +1 -0
  375. package/lib/esm/decorators/common/hidden.js +36 -0
  376. package/lib/esm/decorators/common/hidden.js.map +1 -0
  377. package/lib/esm/decorators/common/ignore.js +67 -0
  378. package/lib/esm/decorators/common/ignore.js.map +1 -0
  379. package/lib/esm/decorators/common/integer.js +67 -0
  380. package/lib/esm/decorators/common/integer.js.map +1 -0
  381. package/lib/esm/decorators/common/jsonEntityFn.js +28 -0
  382. package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -0
  383. package/lib/esm/decorators/common/maxLength.js +85 -0
  384. package/lib/esm/decorators/common/maxLength.js.map +1 -0
  385. package/lib/esm/decorators/common/maximum.js +146 -0
  386. package/lib/esm/decorators/common/maximum.js.map +1 -0
  387. package/lib/esm/decorators/common/minLength.js +86 -0
  388. package/lib/esm/decorators/common/minLength.js.map +1 -0
  389. package/lib/esm/decorators/common/minimum.js +144 -0
  390. package/lib/esm/decorators/common/minimum.js.map +1 -0
  391. package/lib/esm/decorators/common/multipleOf.js +77 -0
  392. package/lib/esm/decorators/common/multipleOf.js.map +1 -0
  393. package/lib/esm/decorators/common/name.js +48 -0
  394. package/lib/esm/decorators/common/name.js.map +1 -0
  395. package/lib/esm/decorators/common/nullable.js +30 -0
  396. package/lib/esm/decorators/common/nullable.js.map +1 -0
  397. package/lib/esm/decorators/common/oneOf.js +23 -0
  398. package/lib/esm/decorators/common/oneOf.js.map +1 -0
  399. package/lib/esm/decorators/common/optional.js +24 -0
  400. package/lib/esm/decorators/common/optional.js.map +1 -0
  401. package/lib/esm/decorators/common/pattern.js +99 -0
  402. package/lib/esm/decorators/common/pattern.js.map +1 -0
  403. package/lib/esm/decorators/common/property.js +23 -0
  404. package/lib/esm/decorators/common/property.js.map +1 -0
  405. package/lib/esm/decorators/common/readOnly.js +17 -0
  406. package/lib/esm/decorators/common/readOnly.js.map +1 -0
  407. package/lib/esm/decorators/common/recordOf.js +59 -0
  408. package/lib/esm/decorators/common/recordOf.js.map +1 -0
  409. package/lib/esm/decorators/common/required.js +49 -0
  410. package/lib/esm/decorators/common/required.js.map +1 -0
  411. package/lib/esm/decorators/common/requiredGroups.js +22 -0
  412. package/lib/esm/decorators/common/requiredGroups.js.map +1 -0
  413. package/lib/esm/decorators/common/schema.js +63 -0
  414. package/lib/esm/decorators/common/schema.js.map +1 -0
  415. package/lib/esm/decorators/common/title.js +45 -0
  416. package/lib/esm/decorators/common/title.js.map +1 -0
  417. package/lib/esm/decorators/common/writeOnly.js +17 -0
  418. package/lib/esm/decorators/common/writeOnly.js.map +1 -0
  419. package/lib/esm/decorators/config/jsonEntityComponent.js +14 -0
  420. package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -0
  421. package/lib/esm/decorators/generics/genericOf.js +95 -0
  422. package/lib/esm/decorators/generics/genericOf.js.map +1 -0
  423. package/lib/esm/decorators/generics/generics.js +21 -0
  424. package/lib/esm/decorators/generics/generics.js.map +1 -0
  425. package/lib/esm/decorators/operations/acceptMime.js +24 -0
  426. package/lib/esm/decorators/operations/acceptMime.js.map +1 -0
  427. package/lib/esm/decorators/operations/consumes.js +35 -0
  428. package/lib/esm/decorators/operations/consumes.js.map +1 -0
  429. package/lib/esm/decorators/operations/contentType.js +24 -0
  430. package/lib/esm/decorators/operations/contentType.js.map +1 -0
  431. package/lib/esm/decorators/operations/deprecated.js +39 -0
  432. package/lib/esm/decorators/operations/deprecated.js.map +1 -0
  433. package/lib/esm/decorators/operations/header.js +55 -0
  434. package/lib/esm/decorators/operations/header.js.map +1 -0
  435. package/lib/esm/decorators/operations/in.js +76 -0
  436. package/lib/esm/decorators/operations/in.js.map +1 -0
  437. package/lib/esm/decorators/operations/inFile.js +41 -0
  438. package/lib/esm/decorators/operations/inFile.js.map +1 -0
  439. package/lib/esm/decorators/operations/location.js +25 -0
  440. package/lib/esm/decorators/operations/location.js.map +1 -0
  441. package/lib/esm/decorators/operations/operationId.js +20 -0
  442. package/lib/esm/decorators/operations/operationId.js.map +1 -0
  443. package/lib/esm/decorators/operations/operationPath.js +30 -0
  444. package/lib/esm/decorators/operations/operationPath.js.map +1 -0
  445. package/lib/esm/decorators/operations/partial.js +14 -0
  446. package/lib/esm/decorators/operations/partial.js.map +1 -0
  447. package/lib/esm/decorators/operations/path.js +25 -0
  448. package/lib/esm/decorators/operations/path.js.map +1 -0
  449. package/lib/esm/decorators/operations/produces.js +42 -0
  450. package/lib/esm/decorators/operations/produces.js.map +1 -0
  451. package/lib/esm/decorators/operations/redirect.js +22 -0
  452. package/lib/esm/decorators/operations/redirect.js.map +1 -0
  453. package/lib/esm/decorators/operations/returns.js +248 -0
  454. package/lib/esm/decorators/operations/returns.js.map +1 -0
  455. package/lib/esm/decorators/operations/route.js +188 -0
  456. package/lib/esm/decorators/operations/route.js.map +1 -0
  457. package/lib/esm/decorators/operations/security.js +39 -0
  458. package/lib/esm/decorators/operations/security.js.map +1 -0
  459. package/lib/esm/decorators/operations/status.js +129 -0
  460. package/lib/esm/decorators/operations/status.js.map +1 -0
  461. package/lib/esm/decorators/operations/summary.js +30 -0
  462. package/lib/esm/decorators/operations/summary.js.map +1 -0
  463. package/lib/esm/decorators/operations/tags.js +48 -0
  464. package/lib/esm/decorators/operations/tags.js.map +1 -0
  465. package/lib/esm/decorators/operations/view.js +27 -0
  466. package/lib/esm/decorators/operations/view.js.map +1 -0
  467. package/lib/esm/domain/DecoratorContext.js +84 -0
  468. package/lib/esm/domain/DecoratorContext.js.map +1 -0
  469. package/lib/esm/domain/JsonAliasMap.js +11 -0
  470. package/lib/esm/domain/JsonAliasMap.js.map +1 -0
  471. package/lib/esm/domain/JsonClassStore.js +34 -0
  472. package/lib/esm/domain/JsonClassStore.js.map +1 -0
  473. package/lib/esm/domain/JsonEntityStore.js +162 -0
  474. package/lib/esm/domain/JsonEntityStore.js.map +1 -0
  475. package/lib/esm/domain/JsonFormatTypes.js +19 -0
  476. package/lib/esm/domain/JsonFormatTypes.js.map +1 -0
  477. package/lib/esm/domain/JsonLazyRef.js +22 -0
  478. package/lib/esm/domain/JsonLazyRef.js.map +1 -0
  479. package/lib/esm/domain/JsonMap.js +23 -0
  480. package/lib/esm/domain/JsonMap.js.map +1 -0
  481. package/lib/esm/domain/JsonMethodStore.js +140 -0
  482. package/lib/esm/domain/JsonMethodStore.js.map +1 -0
  483. package/lib/esm/domain/JsonOperation.js +231 -0
  484. package/lib/esm/domain/JsonOperation.js.map +1 -0
  485. package/lib/esm/domain/JsonOperationPathsMap.js +25 -0
  486. package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -0
  487. package/lib/esm/domain/JsonOperationRoute.js +56 -0
  488. package/lib/esm/domain/JsonOperationRoute.js.map +1 -0
  489. package/lib/esm/domain/JsonParameter.js +115 -0
  490. package/lib/esm/domain/JsonParameter.js.map +1 -0
  491. package/lib/esm/domain/JsonParameterStore.js +96 -0
  492. package/lib/esm/domain/JsonParameterStore.js.map +1 -0
  493. package/lib/esm/domain/JsonParameterTypes.js +22 -0
  494. package/lib/esm/domain/JsonParameterTypes.js.map +1 -0
  495. package/lib/esm/domain/JsonPropertyStore.js +69 -0
  496. package/lib/esm/domain/JsonPropertyStore.js.map +1 -0
  497. package/lib/esm/domain/JsonRequestBody.js +28 -0
  498. package/lib/esm/domain/JsonRequestBody.js.map +1 -0
  499. package/lib/esm/domain/JsonResponse.js +71 -0
  500. package/lib/esm/domain/JsonResponse.js.map +1 -0
  501. package/lib/esm/domain/JsonSchema.js +712 -0
  502. package/lib/esm/domain/JsonSchema.js.map +1 -0
  503. package/lib/esm/domain/SpecTypes.js +7 -0
  504. package/lib/esm/domain/SpecTypes.js.map +1 -0
  505. package/lib/esm/hooks/alterIgnore.js +17 -0
  506. package/lib/esm/hooks/alterIgnore.js.map +1 -0
  507. package/lib/esm/hooks/alterOneOf.js +10 -0
  508. package/lib/esm/hooks/alterOneOf.js.map +1 -0
  509. package/lib/esm/hooks/alterRequiredGroups.js +11 -0
  510. package/lib/esm/hooks/alterRequiredGroups.js.map +1 -0
  511. package/lib/esm/index.js +151 -0
  512. package/lib/esm/index.js.map +1 -0
  513. package/lib/esm/interfaces/IgnoreCallback.js +2 -0
  514. package/lib/esm/interfaces/IgnoreCallback.js.map +1 -0
  515. package/lib/esm/interfaces/JsonHookContext.js +2 -0
  516. package/lib/esm/interfaces/JsonHookContext.js.map +1 -0
  517. package/lib/esm/interfaces/JsonOpenSpec.js +2 -0
  518. package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -0
  519. package/lib/esm/interfaces/JsonSchemaOptions.js +2 -0
  520. package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -0
  521. package/lib/esm/package.json +3 -0
  522. package/lib/esm/registries/JsonSchemaMapperContainer.js +30 -0
  523. package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -0
  524. package/lib/esm/utils/buildPath.js +9 -0
  525. package/lib/esm/utils/buildPath.js.map +1 -0
  526. package/lib/esm/utils/concatParameters.js +12 -0
  527. package/lib/esm/utils/concatParameters.js.map +1 -0
  528. package/lib/esm/utils/concatPath.js +4 -0
  529. package/lib/esm/utils/concatPath.js.map +1 -0
  530. package/lib/esm/utils/defineStatusModel.js +8 -0
  531. package/lib/esm/utils/defineStatusModel.js.map +1 -0
  532. package/lib/esm/utils/from.js +250 -0
  533. package/lib/esm/utils/from.js.map +1 -0
  534. package/lib/esm/utils/generateSpec.js +41 -0
  535. package/lib/esm/utils/generateSpec.js.map +1 -0
  536. package/lib/esm/utils/generics.js +34 -0
  537. package/lib/esm/utils/generics.js.map +1 -0
  538. package/lib/esm/utils/getComputedType.js +22 -0
  539. package/lib/esm/utils/getComputedType.js.map +1 -0
  540. package/lib/esm/utils/getInheritedStores.js +19 -0
  541. package/lib/esm/utils/getInheritedStores.js.map +1 -0
  542. package/lib/esm/utils/getJsonEntityStore.js +14 -0
  543. package/lib/esm/utils/getJsonEntityStore.js.map +1 -0
  544. package/lib/esm/utils/getJsonPathParameters.js +69 -0
  545. package/lib/esm/utils/getJsonPathParameters.js.map +1 -0
  546. package/lib/esm/utils/getJsonSchema.js +61 -0
  547. package/lib/esm/utils/getJsonSchema.js.map +1 -0
  548. package/lib/esm/utils/getJsonType.js +36 -0
  549. package/lib/esm/utils/getJsonType.js.map +1 -0
  550. package/lib/esm/utils/getOperationsRoutes.js +33 -0
  551. package/lib/esm/utils/getOperationsRoutes.js.map +1 -0
  552. package/lib/esm/utils/getOperationsStores.js +29 -0
  553. package/lib/esm/utils/getOperationsStores.js.map +1 -0
  554. package/lib/esm/utils/getPropertiesStores.js +40 -0
  555. package/lib/esm/utils/getPropertiesStores.js.map +1 -0
  556. package/lib/esm/utils/getRequiredProperties.js +62 -0
  557. package/lib/esm/utils/getRequiredProperties.js.map +1 -0
  558. package/lib/esm/utils/getSpec.js +98 -0
  559. package/lib/esm/utils/getSpec.js.map +1 -0
  560. package/lib/esm/utils/getSpecType.js +16 -0
  561. package/lib/esm/utils/getSpecType.js.map +1 -0
  562. package/lib/esm/utils/isSuccessStatus.js +3 -0
  563. package/lib/esm/utils/isSuccessStatus.js.map +1 -0
  564. package/lib/esm/utils/mapHeaders.js +25 -0
  565. package/lib/esm/utils/mapHeaders.js.map +1 -0
  566. package/lib/esm/utils/mapNullableType.js +40 -0
  567. package/lib/esm/utils/mapNullableType.js.map +1 -0
  568. package/lib/esm/utils/mapOpenSpec.js +37 -0
  569. package/lib/esm/utils/mapOpenSpec.js.map +1 -0
  570. package/lib/esm/utils/mapOpenSpec2.js +30 -0
  571. package/lib/esm/utils/mapOpenSpec2.js.map +1 -0
  572. package/lib/esm/utils/mapOpenSpec3.js +22 -0
  573. package/lib/esm/utils/mapOpenSpec3.js.map +1 -0
  574. package/lib/esm/utils/mapOpenSpecInfo.js +17 -0
  575. package/lib/esm/utils/mapOpenSpecInfo.js.map +1 -0
  576. package/lib/esm/utils/mapRouteOptions.js +22 -0
  577. package/lib/esm/utils/mapRouteOptions.js.map +1 -0
  578. package/lib/esm/utils/matchGroups.js +18 -0
  579. package/lib/esm/utils/matchGroups.js.map +1 -0
  580. package/lib/esm/utils/mergeOperation.js +41 -0
  581. package/lib/esm/utils/mergeOperation.js.map +1 -0
  582. package/lib/esm/utils/mergeSpec.js +42 -0
  583. package/lib/esm/utils/mergeSpec.js.map +1 -0
  584. package/lib/esm/utils/operationIdFormatter.js +33 -0
  585. package/lib/esm/utils/operationIdFormatter.js.map +1 -0
  586. package/lib/esm/utils/ref.js +59 -0
  587. package/lib/esm/utils/ref.js.map +1 -0
  588. package/lib/esm/utils/serializeEnumValues.js +21 -0
  589. package/lib/esm/utils/serializeEnumValues.js.map +1 -0
  590. package/lib/esm/utils/toJsonMapCollection.js +11 -0
  591. package/lib/esm/utils/toJsonMapCollection.js.map +1 -0
  592. package/lib/esm/utils/toJsonRegex.js +8 -0
  593. package/lib/esm/utils/toJsonRegex.js.map +1 -0
  594. package/lib/esm/utils/transformToOS2.js +504 -0
  595. package/lib/esm/utils/transformToOS2.js.map +1 -0
  596. package/lib/{components → types/components}/anyMapper.d.ts +0 -0
  597. package/lib/{components → types/components}/classMapper.d.ts +1 -1
  598. package/lib/{components → types/components}/genericsMapper.d.ts +0 -0
  599. package/lib/{components → types/components}/inheritedClassMapper.d.ts +1 -1
  600. package/lib/{components → types/components}/itemMapper.d.ts +0 -0
  601. package/lib/types/components/lazyRefMapper.d.ts +3 -0
  602. package/lib/{components → types/components}/mapMapper.d.ts +1 -1
  603. package/lib/{components → types/components}/objectMapper.d.ts +0 -0
  604. package/lib/types/components/ofMapper.d.ts +3 -0
  605. package/lib/types/components/propertiesMapper.d.ts +3 -0
  606. package/lib/{components → types/components}/schemaMapper.d.ts +1 -1
  607. package/lib/{constants → types/constants}/httpMethods.d.ts +0 -0
  608. package/lib/types/constants/httpStatusMessages.d.ts +11 -0
  609. package/lib/types/decorators/class/children.d.ts +11 -0
  610. package/lib/{decorators → types/decorators}/collections/collectionContains.d.ts +0 -0
  611. package/lib/{decorators → types/decorators}/collections/collectionOf.d.ts +1 -1
  612. package/lib/{decorators → types/decorators}/collections/maxItems.d.ts +0 -0
  613. package/lib/{decorators → types/decorators}/collections/maxProperties.d.ts +0 -0
  614. package/lib/{decorators → types/decorators}/collections/minItems.d.ts +0 -0
  615. package/lib/{decorators → types/decorators}/collections/minProperties.d.ts +0 -0
  616. package/lib/{decorators → types/decorators}/collections/uniqueItems.d.ts +0 -0
  617. package/lib/{decorators → types/decorators}/common/additionalProperties.d.ts +0 -0
  618. package/lib/{decorators → types/decorators}/common/allOf.d.ts +0 -0
  619. package/lib/{decorators → types/decorators}/common/allow.d.ts +0 -0
  620. package/lib/{decorators → types/decorators}/common/any.d.ts +1 -1
  621. package/lib/{decorators → types/decorators}/common/anyOf.d.ts +0 -0
  622. package/lib/{decorators → types/decorators}/common/const.d.ts +1 -1
  623. package/lib/{decorators → types/decorators}/common/customKey.d.ts +0 -0
  624. package/lib/{decorators → types/decorators}/common/default.d.ts +0 -0
  625. package/lib/{decorators → types/decorators}/common/description.d.ts +0 -0
  626. package/lib/{decorators → types/decorators}/common/enum.d.ts +1 -1
  627. package/lib/{decorators → types/decorators}/common/example.d.ts +0 -0
  628. package/lib/types/decorators/common/examples.d.ts +12 -0
  629. package/lib/{decorators → types/decorators}/common/exclusiveMaximum.d.ts +0 -0
  630. package/lib/{decorators → types/decorators}/common/exclusiveMinimum.d.ts +0 -0
  631. package/lib/{decorators → types/decorators}/common/format.d.ts +0 -0
  632. package/lib/{decorators → types/decorators}/common/forwardGroups.d.ts +0 -0
  633. package/lib/{decorators → types/decorators}/common/groups.d.ts +0 -0
  634. package/lib/{decorators → types/decorators}/common/hidden.d.ts +0 -0
  635. package/lib/{decorators → types/decorators}/common/ignore.d.ts +1 -1
  636. package/lib/{decorators → types/decorators}/common/integer.d.ts +0 -0
  637. package/lib/{decorators → types/decorators}/common/jsonEntityFn.d.ts +2 -2
  638. package/lib/{decorators → types/decorators}/common/maxLength.d.ts +0 -0
  639. package/lib/{decorators → types/decorators}/common/maximum.d.ts +0 -0
  640. package/lib/{decorators → types/decorators}/common/minLength.d.ts +0 -0
  641. package/lib/{decorators → types/decorators}/common/minimum.d.ts +0 -0
  642. package/lib/{decorators → types/decorators}/common/multipleOf.d.ts +0 -0
  643. package/lib/{decorators → types/decorators}/common/name.d.ts +0 -0
  644. package/lib/{decorators → types/decorators}/common/nullable.d.ts +1 -1
  645. package/lib/{decorators → types/decorators}/common/oneOf.d.ts +0 -0
  646. package/lib/{decorators → types/decorators}/common/optional.d.ts +0 -0
  647. package/lib/{decorators → types/decorators}/common/pattern.d.ts +0 -0
  648. package/lib/{decorators → types/decorators}/common/property.d.ts +1 -0
  649. package/lib/{decorators → types/decorators}/common/readOnly.d.ts +0 -0
  650. package/lib/types/decorators/common/recordOf.d.ts +46 -0
  651. package/lib/{decorators → types/decorators}/common/required.d.ts +0 -0
  652. package/lib/{decorators → types/decorators}/common/requiredGroups.d.ts +1 -1
  653. package/lib/{decorators → types/decorators}/common/schema.d.ts +0 -0
  654. package/lib/{decorators → types/decorators}/common/title.d.ts +0 -0
  655. package/lib/{decorators → types/decorators}/common/writeOnly.d.ts +0 -0
  656. package/lib/{decorators → types/decorators}/config/jsonEntityComponent.d.ts +0 -0
  657. package/lib/{decorators → types/decorators}/generics/genericOf.d.ts +0 -0
  658. package/lib/{decorators → types/decorators}/generics/generics.d.ts +0 -0
  659. package/lib/types/decorators/operations/acceptMime.d.ts +19 -0
  660. package/lib/{decorators → types/decorators}/operations/consumes.d.ts +0 -0
  661. package/lib/{decorators → types/decorators}/operations/contentType.d.ts +0 -0
  662. package/lib/{decorators → types/decorators}/operations/deprecated.d.ts +0 -0
  663. package/lib/{decorators → types/decorators}/operations/header.d.ts +0 -0
  664. package/lib/{decorators → types/decorators}/operations/in.d.ts +1 -1
  665. package/lib/types/decorators/operations/inFile.d.ts +25 -0
  666. package/lib/{decorators → types/decorators}/operations/location.d.ts +0 -0
  667. package/lib/{decorators → types/decorators}/operations/operationId.d.ts +0 -0
  668. package/lib/{decorators → types/decorators}/operations/operationPath.d.ts +0 -0
  669. package/lib/{decorators → types/decorators}/operations/partial.d.ts +0 -0
  670. package/lib/{decorators → types/decorators}/operations/path.d.ts +0 -0
  671. package/lib/{decorators → types/decorators}/operations/produces.d.ts +0 -0
  672. package/lib/{decorators → types/decorators}/operations/redirect.d.ts +0 -0
  673. package/lib/{decorators → types/decorators}/operations/returns.d.ts +16 -1
  674. package/lib/{decorators → types/decorators}/operations/route.d.ts +3 -0
  675. package/lib/{decorators → types/decorators}/operations/security.d.ts +0 -0
  676. package/lib/{decorators → types/decorators}/operations/status.d.ts +0 -0
  677. package/lib/{decorators → types/decorators}/operations/summary.d.ts +0 -0
  678. package/lib/{decorators → types/decorators}/operations/tags.d.ts +0 -0
  679. package/lib/types/decorators/operations/view.d.ts +23 -0
  680. package/lib/{domain → types/domain}/DecoratorContext.d.ts +0 -0
  681. package/lib/{domain → types/domain}/JsonAliasMap.d.ts +0 -0
  682. package/lib/types/domain/JsonClassStore.d.ts +12 -0
  683. package/lib/types/domain/JsonEntityStore.d.ts +136 -0
  684. package/lib/{domain → types/domain}/JsonFormatTypes.d.ts +0 -0
  685. package/lib/{domain → types/domain}/JsonLazyRef.d.ts +0 -0
  686. package/lib/{domain → types/domain}/JsonMap.d.ts +1 -1
  687. package/lib/types/domain/JsonMethodStore.d.ts +89 -0
  688. package/lib/{domain → types/domain}/JsonOperation.d.ts +3 -1
  689. package/lib/types/domain/JsonOperationPathsMap.d.ts +7 -0
  690. package/lib/types/domain/JsonOperationRoute.d.ts +26 -0
  691. package/lib/{domain → types/domain}/JsonParameter.d.ts +5 -2
  692. package/lib/types/domain/JsonParameterStore.d.ts +52 -0
  693. package/lib/{domain → types/domain}/JsonParameterTypes.d.ts +0 -0
  694. package/lib/types/domain/JsonPropertyStore.d.ts +30 -0
  695. package/lib/{domain → types/domain}/JsonRequestBody.d.ts +0 -0
  696. package/lib/{domain → types/domain}/JsonResponse.d.ts +2 -1
  697. package/lib/{domain → types/domain}/JsonSchema.d.ts +8 -14
  698. package/lib/{domain → types/domain}/SpecTypes.d.ts +0 -0
  699. package/lib/{hooks → types/hooks}/alterIgnore.d.ts +0 -0
  700. package/lib/types/hooks/alterOneOf.d.ts +3 -0
  701. package/lib/{hooks → types/hooks}/alterRequiredGroups.d.ts +0 -0
  702. package/lib/types/index.d.ts +150 -0
  703. package/lib/{interfaces → types/interfaces}/IgnoreCallback.d.ts +0 -0
  704. package/lib/{interfaces → types/interfaces}/JsonHookContext.d.ts +0 -0
  705. package/lib/{interfaces → types/interfaces}/JsonOpenSpec.d.ts +0 -0
  706. package/lib/{interfaces → types/interfaces}/JsonSchemaOptions.d.ts +0 -0
  707. package/lib/{registries → types/registries}/JsonSchemaMapperContainer.d.ts +3 -2
  708. package/lib/{utils → types/utils}/buildPath.d.ts +0 -0
  709. package/lib/{utils → types/utils}/concatParameters.d.ts +0 -0
  710. package/lib/types/utils/concatPath.d.ts +1 -0
  711. package/lib/{utils → types/utils}/defineStatusModel.d.ts +0 -0
  712. package/lib/{utils → types/utils}/from.d.ts +0 -0
  713. package/lib/types/utils/generateSpec.d.ts +16 -0
  714. package/lib/{utils → types/utils}/generics.d.ts +1 -1
  715. package/lib/{utils → types/utils}/getComputedType.d.ts +0 -0
  716. package/lib/{utils → types/utils}/getInheritedStores.d.ts +2 -2
  717. package/lib/types/utils/getJsonEntityStore.d.ts +15 -0
  718. package/lib/{utils → types/utils}/getJsonPathParameters.d.ts +0 -0
  719. package/lib/types/utils/getJsonSchema.d.ts +14 -0
  720. package/lib/{utils → types/utils}/getJsonType.d.ts +0 -0
  721. package/lib/types/utils/getOperationsRoutes.d.ts +8 -0
  722. package/lib/types/utils/getOperationsStores.d.ts +6 -0
  723. package/lib/types/utils/getPropertiesStores.d.ts +20 -0
  724. package/lib/{utils → types/utils}/getRequiredProperties.d.ts +0 -0
  725. package/lib/types/utils/getSpec.d.ts +30 -0
  726. package/lib/types/utils/getSpecType.d.ts +12 -0
  727. package/lib/{utils → types/utils}/isSuccessStatus.d.ts +0 -0
  728. package/lib/{utils → types/utils}/mapHeaders.d.ts +0 -0
  729. package/lib/{utils → types/utils}/mapNullableType.d.ts +1 -1
  730. package/lib/types/utils/mapOpenSpec.d.ts +10 -0
  731. package/lib/types/utils/mapOpenSpec2.d.ts +9 -0
  732. package/lib/types/utils/mapOpenSpec3.d.ts +8 -0
  733. package/lib/types/utils/mapOpenSpecInfo.d.ts +6 -0
  734. package/lib/{utils → types/utils}/mapRouteOptions.d.ts +1 -1
  735. package/lib/{utils → types/utils}/matchGroups.d.ts +0 -0
  736. package/lib/{utils → types/utils}/mergeOperation.d.ts +0 -0
  737. package/lib/{utils → types/utils}/mergeSpec.d.ts +0 -0
  738. package/lib/{utils → types/utils}/operationIdFormatter.d.ts +0 -0
  739. package/lib/types/utils/ref.d.ts +14 -0
  740. package/lib/types/utils/serializeEnumValues.d.ts +5 -0
  741. package/lib/{utils → types/utils}/toJsonMapCollection.d.ts +0 -0
  742. package/lib/{utils → types/utils}/toJsonRegex.d.ts +0 -0
  743. package/lib/types/utils/transformToOS2.d.ts +25 -0
  744. package/package.json +44 -25
  745. package/readme.md +1 -0
  746. package/tsconfig.compile.esm.json +13 -0
  747. package/lib/components/index.d.ts +0 -9
  748. package/lib/components/lazyRefMapper.d.ts +0 -19
  749. package/lib/constants/httpStatusMessages.d.ts +0 -5
  750. package/lib/decorators/index.d.ts +0 -65
  751. package/lib/domain/JsonEntityStore.d.ts +0 -94
  752. package/lib/domain/index.d.ts +0 -11
  753. package/lib/index.d.ts +0 -17
  754. package/lib/index.js +0 -7894
  755. package/lib/index.js.map +0 -1
  756. package/lib/index.modern.js +0 -7751
  757. package/lib/index.modern.js.map +0 -1
  758. package/lib/interfaces/index.d.ts +0 -4
  759. package/lib/registries/JsonEntitiesContainer.d.ts +0 -6
  760. package/lib/utils/getJsonEntityStore.d.ts +0 -6
  761. package/lib/utils/getJsonSchema.d.ts +0 -5
  762. package/lib/utils/getOperationsStores.d.ts +0 -6
  763. package/lib/utils/getPropertiesStores.d.ts +0 -20
  764. package/lib/utils/getSpec.d.ts +0 -49
  765. package/lib/utils/isJsonClass.d.ts +0 -4
  766. package/lib/utils/mergeSpec.benchmark.d.ts +0 -1
  767. package/lib/utils/ref.d.ts +0 -46
@@ -0,0 +1,56 @@
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
+ /**
3
+ * The value `maxItems` MUST be a non-negative integer.
4
+ *
5
+ * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.
6
+ *
7
+ * :: warning
8
+ * The value `maxItems` MUST be a non-negative integer.
9
+ * :::
10
+ *
11
+ * :: warning
12
+ * This decorator will be removed in v7.
13
+ * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/common.
14
+ * :::
15
+ *
16
+ * ## Example
17
+ *
18
+ * ```typescript
19
+ * class Model {
20
+ * @CollectionOf(String)
21
+ * @MaxItems(10)
22
+ * property: string[];
23
+ * }
24
+ * ```
25
+ *
26
+ * Will produce:
27
+ *
28
+ * ```json
29
+ * {
30
+ * "type": "object",
31
+ * "properties": {
32
+ * "property": {
33
+ * "type": "number",
34
+ * "maxItems": 10
35
+ * }
36
+ * }
37
+ * }
38
+ * ```
39
+ *
40
+ * @param {number} maxItems
41
+ * @decorator
42
+ * @validation
43
+ * @swagger
44
+ * @schema
45
+ * @input
46
+ * @collections
47
+ */
48
+ export function MaxItems(maxItems) {
49
+ if (maxItems < 0) {
50
+ throw new Error("The value of maxItems MUST be a non-negative integer.");
51
+ }
52
+ return JsonEntityFn((storedJson) => {
53
+ storedJson.schema.maxItems(maxItems);
54
+ });
55
+ }
56
+ //# sourceMappingURL=maxItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maxItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,YAAY,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MaxItems(maxItems: number) {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n}\n"]}
@@ -0,0 +1,79 @@
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
+ /**
3
+ * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.
4
+ *
5
+ * ::: warning
6
+ * The value of this keyword MUST be a non-negative integer.
7
+ * :::
8
+ *
9
+ * ::: warning
10
+ * This decorator will be removed in v7.
11
+ * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/common.
12
+ * :::
13
+ *
14
+ * ## Example
15
+ * ### On prop
16
+ * ```typescript
17
+ * class Model {
18
+ * @MaxProperties(10)
19
+ * property: any;
20
+ * }
21
+ * ```
22
+ *
23
+ * Will produce:
24
+ *
25
+ * ```json
26
+ * {
27
+ * "type": "object",
28
+ * "properties": {
29
+ * "property": {
30
+ * "type": "any",
31
+ * "maxProperties": 10
32
+ * }
33
+ * }
34
+ * }
35
+ * ```
36
+ *
37
+ * ### On class
38
+ *
39
+ * ```typescript
40
+ * @MaxProperties(10)
41
+ * class Model {
42
+ * }
43
+ * ```
44
+ *
45
+ * Will produce:
46
+ *
47
+ * ```json
48
+ * {
49
+ * "type": "object",
50
+ * "maxProperties": 10
51
+ * }
52
+ * ```
53
+ *
54
+ * ### On Parameter
55
+ *
56
+ * ```typescript
57
+ *
58
+ * class Model {
59
+ * method(@Any() @MaxProperties(10) obj: any){}
60
+ * }
61
+ * ```
62
+ *
63
+ * @param {number} maxProperties The maximum properties allowed on the given object
64
+ * @decorator
65
+ * @validation
66
+ * @swagger
67
+ * @schema
68
+ * @input
69
+ * @collections
70
+ */
71
+ export function MaxProperties(maxProperties) {
72
+ if (maxProperties < 0) {
73
+ throw new Error("The value of maxProperties MUST be a non-negative integer.");
74
+ }
75
+ return JsonEntityFn((store) => {
76
+ store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);
77
+ });
78
+ }
79
+ //# sourceMappingURL=maxProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maxProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAM,UAAU,aAAa,CAAC,aAAqB;IACjD,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACjH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MaxProperties(maxProperties: number) {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n}\n"]}
@@ -0,0 +1,60 @@
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
+ /**
3
+ * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.
4
+ *
5
+ * ::: warning
6
+ * The value `minItems` MUST be a non-negative integer.
7
+ * :::
8
+ *
9
+ * ::: tip
10
+ * Omitting this keyword has the same behavior as a value of 0.
11
+ * :::
12
+ *
13
+ * ::: warning
14
+ * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/common.
15
+ * :::
16
+ *
17
+ * ## Example
18
+ *
19
+ * ```typescript
20
+ * class Model {
21
+ * @CollectionOf(String)
22
+ * @MinItems(10)
23
+ * property: string[];
24
+ * }
25
+ * ```
26
+ *
27
+ * Will produce:
28
+ *
29
+ * ```json
30
+ * {
31
+ * "type": "object",
32
+ * "properties": {
33
+ * "property": {
34
+ * "type": "array",
35
+ * "minItems": 10,
36
+ * "items": {
37
+ * "type": "string"
38
+ * }
39
+ * }
40
+ * }
41
+ * }
42
+ * ```
43
+ *
44
+ * @param {number} minItems
45
+ * @decorator
46
+ * @validation
47
+ * @swagger
48
+ * @schema
49
+ * @input
50
+ * @collections
51
+ */
52
+ export function MinItems(minItems) {
53
+ if (minItems < 0) {
54
+ throw new Error("The value of minItems MUST be a non-negative integer.");
55
+ }
56
+ return JsonEntityFn((storedJson) => {
57
+ storedJson.schema.minItems(minItems);
58
+ });
59
+ }
60
+ //# sourceMappingURL=minItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,YAAY,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MinItems(minItems: number) {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n}\n"]}
@@ -0,0 +1,78 @@
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
+ /**
3
+ * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.
4
+ *
5
+ * ::: warning
6
+ * The value of this keyword MUST be a non-negative integer.
7
+ * :::
8
+ *
9
+ * ::: warning
10
+ * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/common.
11
+ * :::
12
+ *
13
+ * ## Example
14
+ * ### On prop
15
+ * ```typescript
16
+ * class Model {
17
+ * @MinProperties(10)
18
+ * property: any;
19
+ * }
20
+ * ```
21
+ *
22
+ * Will produce:
23
+ *
24
+ * ```json
25
+ * {
26
+ * "type": "object",
27
+ * "properties": {
28
+ * "property": {
29
+ * "type": "any",
30
+ * "minProperties": 10
31
+ * }
32
+ * }
33
+ * }
34
+ * ```
35
+ *
36
+ * ### On class
37
+ *
38
+ * ```typescript
39
+ * @MinProperties(10)
40
+ * class Model {
41
+ * }
42
+ * ```
43
+ *
44
+ * Will produce:
45
+ *
46
+ * ```json
47
+ * {
48
+ * "type": "object",
49
+ * "minProperties": 10
50
+ * }
51
+ * ```
52
+ *
53
+ * ### On Parameter
54
+ *
55
+ * ```typescript
56
+ *
57
+ * class Model {
58
+ * method(@Any() @MinProperties(10) obj: any){}
59
+ * }
60
+ * ```
61
+ *
62
+ * @param {number} minProperties The minimum properties allowed on the object.
63
+ * @decorator
64
+ * @validation
65
+ * @swagger
66
+ * @schema
67
+ * @input
68
+ * @collections
69
+ */
70
+ export function MinProperties(minProperties) {
71
+ if (minProperties < 0) {
72
+ throw new Error("The value of minProperties MUST be a non-negative integer.");
73
+ }
74
+ return JsonEntityFn((store) => {
75
+ store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);
76
+ });
77
+ }
78
+ //# sourceMappingURL=minProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,UAAU,aAAa,CAAC,aAAqB;IACjD,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IACjH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function MinProperties(minProperties: number) {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n}\n"]}
@@ -0,0 +1,56 @@
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
+ /**
3
+ * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
4
+ *
5
+ * ::: warning
6
+ * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/common.
7
+ * :::
8
+ *
9
+ * ## Example
10
+ *
11
+ * ```typescript
12
+ * class Model {
13
+ * @UniqueItems() // default true
14
+ * property: number[];
15
+ * }
16
+ * ```
17
+ *
18
+ * * ```typescript
19
+ * class Model {
20
+ * @CollectionOf(String)
21
+ * @UniqueItems()
22
+ * property: string[];
23
+ * }
24
+ * ```
25
+ *
26
+ * Will produce:
27
+ *
28
+ * ```json
29
+ * {
30
+ * "type": "object",
31
+ * "properties": {
32
+ * "property": {
33
+ * "type": "array",
34
+ * "uniqueItems": true,
35
+ * "items": {
36
+ * "type": "string"
37
+ * }
38
+ * }
39
+ * }
40
+ * }
41
+ * ```
42
+ *
43
+ * @param {boolean} uniqueItems
44
+ * @decorator
45
+ * @validation
46
+ * @swagger
47
+ * @schema
48
+ * @input
49
+ * @collections
50
+ */
51
+ export function UniqueItems(uniqueItems = true) {
52
+ return JsonEntityFn((store) => {
53
+ store.schema.uniqueItems(uniqueItems);
54
+ });
55
+ }
56
+ //# sourceMappingURL=uniqueItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uniqueItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/uniqueItems.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,UAAU,WAAW,CAAC,cAAuB,IAAI;IACrD,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n *\n * ::: warning\n * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @UniqueItems() // default true\n * property: number[];\n * }\n * ```\n *\n * * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @UniqueItems()\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"uniqueItems\": true,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {boolean} uniqueItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function UniqueItems(uniqueItems: boolean = true) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.uniqueItems(uniqueItems);\n });\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
+ /**
3
+ * Accept unknown properties on the deserialized model.
4
+ *
5
+ * @param schema
6
+ * @decorator
7
+ * @validation
8
+ * @swagger
9
+ * @schema
10
+ */
11
+ export function AdditionalProperties(schema) {
12
+ return JsonEntityFn((entity, parameters) => {
13
+ entity.itemSchema.additionalProperties(schema);
14
+ });
15
+ }
16
+ //# sourceMappingURL=additionalProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"additionalProperties.js","sourceRoot":"","sources":["../../../../src/decorators/common/additionalProperties.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA+B;IAClE,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {AnyJsonSchema} from \"../../domain/JsonSchema\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Accept unknown properties on the deserialized model.\n *\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function AdditionalProperties(schema: boolean | AnyJsonSchema) {\n return JsonEntityFn((entity, parameters) => {\n entity.itemSchema.additionalProperties(schema);\n });\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
+ /**
3
+ * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
4
+ *
5
+ * @decorator
6
+ * @validation
7
+ * @swagger
8
+ * @schema
9
+ * @classDecorator
10
+ * @input
11
+ * @param allOf
12
+ */
13
+ export function AllOf(...allOf) {
14
+ return JsonEntityFn((entity) => {
15
+ entity.itemSchema.allOf(allOf);
16
+ });
17
+ }
18
+ //# sourceMappingURL=allOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/allOf.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {AnyJsonSchema} from \"../../domain/JsonSchema\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param allOf\n */\nexport function AllOf(...allOf: AnyJsonSchema[]) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.allOf(allOf);\n });\n}\n"]}
@@ -0,0 +1,43 @@
1
+ import { DecoratorTypes, isClass, useDecorators } from "@tsed/core";
2
+ import { JsonEntityFn } from "./jsonEntityFn.js";
3
+ import { Property } from "./property.js";
4
+ /**
5
+ * Add allowed values when the property or parameters is required.
6
+ *
7
+ * #### Example on parameter:
8
+ *
9
+ * ```typescript
10
+ * @Post("/")
11
+ * async method(@Allow("") @BodyParams("field") field: string) {}
12
+ * ```
13
+ * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.
14
+ *
15
+ * #### Example on model:
16
+ *
17
+ * ```typescript
18
+ * class Model {
19
+ * @Allow("")
20
+ * field: string;
21
+ * }
22
+ * ```
23
+ *
24
+ * @returns {Function}
25
+ * @decorator
26
+ * @validation
27
+ * @swagger
28
+ * @schema
29
+ * @input
30
+ */
31
+ export function Allow(...values) {
32
+ const model = values.find((item) => isClass(item));
33
+ return useDecorators(model && Property(model), JsonEntityFn((store, args) => {
34
+ store.schema.allow(...values);
35
+ if (store.decoratorType === DecoratorTypes.PARAM) {
36
+ store.required = true;
37
+ }
38
+ if (store.decoratorType === DecoratorTypes.PROP) {
39
+ store.parentSchema.addRequired(store.propertyName);
40
+ }
41
+ }));
42
+ }
43
+ //# sourceMappingURL=allow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allow.js","sourceRoot":"","sources":["../../../../src/decorators/common/allow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,OAAO,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAClE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAGpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,MAAa;IACpC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,OAAO,aAAa,CAClB,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,EACxB,YAAY,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAC3B,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;QAE9B,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,KAAK,EAAE;YAC/C,KAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;SAC/C;QAED,IAAI,KAAK,CAAC,aAAa,KAAK,cAAc,CAAC,IAAI,EAAE;YAC/C,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;SACpD;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import {DecoratorTypes, isClass, useDecorators} from \"@tsed/core\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\nimport {Property} from \"./property\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore\";\n\n/**\n * Add allowed values when the property or parameters is required.\n *\n * #### Example on parameter:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Allow(\"\") @BodyParams(\"field\") field: string) {}\n * ```\n * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.\n *\n * #### Example on model:\n *\n * ```typescript\n * class Model {\n * @Allow(\"\")\n * field: string;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Allow(...values: any[]) {\n const model = values.find((item) => isClass(item));\n return useDecorators(\n model && Property(model),\n JsonEntityFn((store, args) => {\n store.schema.allow(...values);\n\n if (store.decoratorType === DecoratorTypes.PARAM) {\n (store as JsonParameterStore).required = true;\n }\n\n if (store.decoratorType === DecoratorTypes.PROP) {\n store.parentSchema.addRequired(store.propertyName);\n }\n })\n );\n}\n"]}
@@ -0,0 +1,42 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
+ /**
3
+ * Set the type of the array items.
4
+ *
5
+ * ## Example
6
+ *
7
+ * ```typescript
8
+ * class Model {
9
+ * @Any()
10
+ * property: any;
11
+ *
12
+ * @Any(String, Number, Boolean)
13
+ * property: string | number | boolean;
14
+ * }
15
+ * ```
16
+ *
17
+ * Will produce:
18
+ *
19
+ * ```json
20
+ * {
21
+ * "type": "object",
22
+ * "properties": {
23
+ * "property": {
24
+ * "type": ["integer", "number", "string", "boolean", "array", "object", "null"]
25
+ * }
26
+ * }
27
+ * }
28
+ * ```
29
+ *
30
+ * @returns {Function}
31
+ * @decorator
32
+ * @validation
33
+ * @swagger
34
+ * @schema
35
+ * @input
36
+ */
37
+ export function Any(...types) {
38
+ return JsonEntityFn((store) => {
39
+ store.itemSchema.any(...types);
40
+ });
41
+ }
42
+ //# sourceMappingURL=any.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any.js","sourceRoot":"","sources":["../../../../src/decorators/common/any.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,UAAU,GAAG,CAAC,GAAG,KAAgD;IACrE,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport type {JSONSchema6TypeName} from \"json-schema\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Set the type of the array items.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Any()\n * property: any;\n *\n * @Any(String, Number, Boolean)\n * property: string | number | boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"]\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Any(...types: (JSONSchema6TypeName | Type<any> | any)[]) {\n return JsonEntityFn((store) => {\n store.itemSchema.any(...types);\n });\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
+ /**
3
+ * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
4
+ *
5
+ * ::: warning
6
+ * AnyOf isn't supported by OS2
7
+ * :::
8
+ *
9
+ * @decorator
10
+ * @validation
11
+ * @swagger
12
+ * @schema
13
+ * @classDecorator
14
+ * @input
15
+ * @param anyOf
16
+ */
17
+ export function AnyOf(...anyOf) {
18
+ return JsonEntityFn((entity) => {
19
+ entity.itemSchema.anyOf(anyOf);
20
+ });
21
+ }
22
+ //# sourceMappingURL=anyOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anyOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/anyOf.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {AnyJsonSchema} from \"../../domain/JsonSchema\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * ::: warning\n * AnyOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param anyOf\n */\nexport function AnyOf(...anyOf: AnyJsonSchema[]) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.anyOf(anyOf);\n });\n}\n"]}
@@ -0,0 +1,66 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
+ /**
3
+ * The const keyword is used to restrict a value to a fixed value.
4
+ *
5
+ * ::: warning
6
+ * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/common.
7
+ * :::
8
+ *
9
+ * ## Example
10
+ * ### With a string
11
+ *
12
+ * ```typescript
13
+ * class Model {
14
+ * @Const("value1")
15
+ * property: "value1";
16
+ * }
17
+ * ```
18
+ *
19
+ * Will produce:
20
+ *
21
+ * ```json
22
+ * {
23
+ * "type": "object",
24
+ * "properties": {
25
+ * "property": {
26
+ * "type": "string",
27
+ * "const": "value1"
28
+ * }
29
+ * }
30
+ * }
31
+ * ```
32
+ * * ### With a boolean
33
+ *
34
+ * ```typescript
35
+ * class Model {
36
+ * @Const(true)
37
+ * property: boolean;
38
+ * }
39
+ * ```
40
+ *
41
+ * Will produce:
42
+ *
43
+ * ```json
44
+ * {
45
+ * "type": "object",
46
+ * "properties": {
47
+ * "property": {
48
+ * "type": "boolean",
49
+ * "const": true
50
+ * }
51
+ * }
52
+ * }
53
+ * ```
54
+ *
55
+ * @param {string | number | boolean } constValue
56
+ * @decorator
57
+ * @validation
58
+ * @swagger
59
+ * @schema
60
+ */
61
+ export function Const(constValue) {
62
+ return JsonEntityFn((store) => {
63
+ store.itemSchema.const(constValue);
64
+ });
65
+ }
66
+ //# sourceMappingURL=const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/decorators/common/const.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,MAAM,UAAU,KAAK,CAAC,UAAiC;IACrD,OAAO,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type {JSONSchema6Type} from \"json-schema\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The const keyword is used to restrict a value to a fixed value.\n *\n * ::: warning\n * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With a string\n *\n * ```typescript\n * class Model {\n * @Const(\"value1\")\n * property: \"value1\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"const\": \"value1\"\n * }\n * }\n * }\n * ```\n * * ### With a boolean\n *\n * ```typescript\n * class Model {\n * @Const(true)\n * property: boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"boolean\",\n * \"const\": true\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean } constValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Const(constValue: JSONSchema6Type | any) {\n return JsonEntityFn((store) => {\n store.itemSchema.const(constValue);\n });\n}\n"]}
@@ -0,0 +1,38 @@
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
+ /**
3
+ * Set a custom key on JsonSchema that is not a part of the official spec.
4
+ *
5
+ * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.
6
+ *
7
+ * @returns {Function}
8
+ * @decorator
9
+ * @validation
10
+ * @property
11
+ * @parameter
12
+ * @schema
13
+ */
14
+ export function CustomKey(key, value) {
15
+ return JsonEntityFn((store) => {
16
+ store.itemSchema.customKey(key, value);
17
+ });
18
+ }
19
+ /**
20
+ * Set a group of custom keys on JsonSchema that is not a part of the official spec.
21
+ *
22
+ * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.
23
+ *
24
+ * @returns {Function}
25
+ * @decorator
26
+ * @validation
27
+ * @property
28
+ * @parameter
29
+ * @schema
30
+ */
31
+ export function CustomKeys(obj) {
32
+ return JsonEntityFn((store) => {
33
+ Object.entries(obj).forEach(([key, value]) => {
34
+ store.itemSchema.customKey(key, value);
35
+ });
36
+ });
37
+ }
38
+ //# sourceMappingURL=customKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customKey.js","sourceRoot":"","sources":["../../../../src/decorators/common/customKey.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,KAAU;IAC/C,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AACD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,GAAwB;IACjD,OAAO,YAAY,CAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC3C,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Set a custom key on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKey(key: string, value: any) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.customKey(key, value);\n });\n}\n/**\n * Set a group of custom keys on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKeys(obj: Record<string, any>) {\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(obj).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n });\n });\n}\n"]}