@tsed/schema 7.18.3-rc.1 → 7.18.4

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 (347) hide show
  1. package/.eslintignore +13 -0
  2. package/.eslintrc.js +1 -0
  3. package/jest.config.js +13 -3
  4. package/lib/browser/schema.umd.min.js +1 -1
  5. package/lib/browser/schema.umd.min.js.map +1 -1
  6. package/lib/cjs/components/anyMapper.js.map +1 -1
  7. package/lib/cjs/components/classMapper.js.map +1 -1
  8. package/lib/cjs/components/genericsMapper.js.map +1 -1
  9. package/lib/cjs/components/inheritedClassMapper.js.map +1 -1
  10. package/lib/cjs/components/itemMapper.js.map +1 -1
  11. package/lib/cjs/components/lazyRefMapper.js.map +1 -1
  12. package/lib/cjs/components/mapMapper.js.map +1 -1
  13. package/lib/cjs/components/objectMapper.js.map +1 -1
  14. package/lib/cjs/components/ofMapper.js.map +1 -1
  15. package/lib/cjs/components/propertiesMapper.js.map +1 -1
  16. package/lib/cjs/components/schemaMapper.js +2 -0
  17. package/lib/cjs/components/schemaMapper.js.map +1 -1
  18. package/lib/cjs/constants/httpMethods.js.map +1 -1
  19. package/lib/cjs/constants/httpStatusMessages.js.map +1 -1
  20. package/lib/cjs/decorators/class/children.js.map +1 -1
  21. package/lib/cjs/decorators/class/discriminatorValue.js.map +1 -1
  22. package/lib/cjs/decorators/collections/collectionContains.js.map +1 -1
  23. package/lib/cjs/decorators/collections/collectionOf.js.map +1 -1
  24. package/lib/cjs/decorators/collections/maxItems.js.map +1 -1
  25. package/lib/cjs/decorators/collections/maxProperties.js.map +1 -1
  26. package/lib/cjs/decorators/collections/minItems.js.map +1 -1
  27. package/lib/cjs/decorators/collections/minProperties.js.map +1 -1
  28. package/lib/cjs/decorators/collections/uniqueItems.js.map +1 -1
  29. package/lib/cjs/decorators/common/additionalProperties.js.map +1 -1
  30. package/lib/cjs/decorators/common/allOf.js.map +1 -1
  31. package/lib/cjs/decorators/common/allow.js.map +1 -1
  32. package/lib/cjs/decorators/common/any.js.map +1 -1
  33. package/lib/cjs/decorators/common/anyOf.js.map +1 -1
  34. package/lib/cjs/decorators/common/const.js.map +1 -1
  35. package/lib/cjs/decorators/common/customKey.js.map +1 -1
  36. package/lib/cjs/decorators/common/default.js.map +1 -1
  37. package/lib/cjs/decorators/common/defaultMsg.js.map +1 -1
  38. package/lib/cjs/decorators/common/description.js.map +1 -1
  39. package/lib/cjs/decorators/common/discriminatorKey.js.map +1 -1
  40. package/lib/cjs/decorators/common/enum.js.map +1 -1
  41. package/lib/cjs/decorators/common/errorMsg.js.map +1 -1
  42. package/lib/cjs/decorators/common/example.js.map +1 -1
  43. package/lib/cjs/decorators/common/examples.js.map +1 -1
  44. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +1 -1
  45. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +1 -1
  46. package/lib/cjs/decorators/common/format.js.map +1 -1
  47. package/lib/cjs/decorators/common/forwardGroups.js.map +1 -1
  48. package/lib/cjs/decorators/common/groups.js.map +1 -1
  49. package/lib/cjs/decorators/common/hidden.js.map +1 -1
  50. package/lib/cjs/decorators/common/ignore.js.map +1 -1
  51. package/lib/cjs/decorators/common/integer.js.map +1 -1
  52. package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -1
  53. package/lib/cjs/decorators/common/maxLength.js.map +1 -1
  54. package/lib/cjs/decorators/common/maximum.js.map +1 -1
  55. package/lib/cjs/decorators/common/minLength.js.map +1 -1
  56. package/lib/cjs/decorators/common/minimum.js.map +1 -1
  57. package/lib/cjs/decorators/common/multipleOf.js.map +1 -1
  58. package/lib/cjs/decorators/common/name.js.map +1 -1
  59. package/lib/cjs/decorators/common/nullable.js.map +1 -1
  60. package/lib/cjs/decorators/common/oneOf.js.map +1 -1
  61. package/lib/cjs/decorators/common/optional.js.map +1 -1
  62. package/lib/cjs/decorators/common/pattern.js.map +1 -1
  63. package/lib/cjs/decorators/common/property.js.map +1 -1
  64. package/lib/cjs/decorators/common/readOnly.js.map +1 -1
  65. package/lib/cjs/decorators/common/recordOf.js.map +1 -1
  66. package/lib/cjs/decorators/common/required.js.map +1 -1
  67. package/lib/cjs/decorators/common/requiredGroups.js.map +1 -1
  68. package/lib/cjs/decorators/common/schema.js.map +1 -1
  69. package/lib/cjs/decorators/common/title.js.map +1 -1
  70. package/lib/cjs/decorators/common/typeError.js.map +1 -1
  71. package/lib/cjs/decorators/common/writeOnly.js.map +1 -1
  72. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +1 -1
  73. package/lib/cjs/decorators/generics/genericOf.js.map +1 -1
  74. package/lib/cjs/decorators/generics/generics.js.map +1 -1
  75. package/lib/cjs/decorators/operations/acceptMime.js.map +1 -1
  76. package/lib/cjs/decorators/operations/consumes.js.map +1 -1
  77. package/lib/cjs/decorators/operations/contentType.js.map +1 -1
  78. package/lib/cjs/decorators/operations/deprecated.js.map +1 -1
  79. package/lib/cjs/decorators/operations/header.js.map +1 -1
  80. package/lib/cjs/decorators/operations/in.js.map +1 -1
  81. package/lib/cjs/decorators/operations/inFile.js.map +1 -1
  82. package/lib/cjs/decorators/operations/location.js.map +1 -1
  83. package/lib/cjs/decorators/operations/operationId.js.map +1 -1
  84. package/lib/cjs/decorators/operations/operationPath.js.map +1 -1
  85. package/lib/cjs/decorators/operations/partial.js.map +1 -1
  86. package/lib/cjs/decorators/operations/path.js.map +1 -1
  87. package/lib/cjs/decorators/operations/produces.js.map +1 -1
  88. package/lib/cjs/decorators/operations/redirect.js.map +1 -1
  89. package/lib/cjs/decorators/operations/returns.js.map +1 -1
  90. package/lib/cjs/decorators/operations/route.js.map +1 -1
  91. package/lib/cjs/decorators/operations/security.js.map +1 -1
  92. package/lib/cjs/decorators/operations/status.js.map +1 -1
  93. package/lib/cjs/decorators/operations/summary.js.map +1 -1
  94. package/lib/cjs/decorators/operations/tags.js.map +1 -1
  95. package/lib/cjs/decorators/operations/view.js.map +1 -1
  96. package/lib/cjs/domain/DecoratorContext.js.map +1 -1
  97. package/lib/cjs/domain/JsonAliasMap.js.map +1 -1
  98. package/lib/cjs/domain/JsonClassStore.js.map +1 -1
  99. package/lib/cjs/domain/JsonDiscriminator.js.map +1 -1
  100. package/lib/cjs/domain/JsonEntityStore.js.map +1 -1
  101. package/lib/cjs/domain/JsonFormatTypes.js.map +1 -1
  102. package/lib/cjs/domain/JsonLazyRef.js.map +1 -1
  103. package/lib/cjs/domain/JsonMap.js.map +1 -1
  104. package/lib/cjs/domain/JsonMethodStore.js.map +1 -1
  105. package/lib/cjs/domain/JsonOperation.js.map +1 -1
  106. package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -1
  107. package/lib/cjs/domain/JsonOperationRoute.js.map +1 -1
  108. package/lib/cjs/domain/JsonParameter.js.map +1 -1
  109. package/lib/cjs/domain/JsonParameterStore.js.map +1 -1
  110. package/lib/cjs/domain/JsonParameterTypes.js.map +1 -1
  111. package/lib/cjs/domain/JsonPropertyStore.js.map +1 -1
  112. package/lib/cjs/domain/JsonRequestBody.js.map +1 -1
  113. package/lib/cjs/domain/JsonResponse.js.map +1 -1
  114. package/lib/cjs/domain/JsonSchema.js +1 -1
  115. package/lib/cjs/domain/JsonSchema.js.map +1 -1
  116. package/lib/cjs/domain/SpecTypes.js.map +1 -1
  117. package/lib/cjs/hooks/alterIgnore.js.map +1 -1
  118. package/lib/cjs/hooks/alterOneOf.js.map +1 -1
  119. package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -1
  120. package/lib/cjs/index.js +1 -0
  121. package/lib/cjs/index.js.map +1 -1
  122. package/lib/cjs/interfaces/IgnoreCallback.js.map +1 -1
  123. package/lib/cjs/interfaces/JsonHookContext.js.map +1 -1
  124. package/lib/cjs/interfaces/JsonOpenSpec.js.map +1 -1
  125. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -1
  126. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +1 -1
  127. package/lib/cjs/registries/enumRegistries.js.map +1 -1
  128. package/lib/cjs/utils/buildPath.js.map +1 -1
  129. package/lib/cjs/utils/concatParameters.js.map +1 -1
  130. package/lib/cjs/utils/concatPath.js.map +1 -1
  131. package/lib/cjs/utils/defineStatusModel.js.map +1 -1
  132. package/lib/cjs/utils/from.js.map +1 -1
  133. package/lib/cjs/utils/generateSpec.js.map +1 -1
  134. package/lib/cjs/utils/generics.js.map +1 -1
  135. package/lib/cjs/utils/getComputedType.js +1 -1
  136. package/lib/cjs/utils/getComputedType.js.map +1 -1
  137. package/lib/cjs/utils/getInheritedStores.js.map +1 -1
  138. package/lib/cjs/utils/getJsonEntityStore.js.map +1 -1
  139. package/lib/cjs/utils/getJsonPathParameters.js.map +1 -1
  140. package/lib/cjs/utils/getJsonSchema.js.map +1 -1
  141. package/lib/cjs/utils/getJsonType.js.map +1 -1
  142. package/lib/cjs/utils/getOperationsRoutes.js.map +1 -1
  143. package/lib/cjs/utils/getOperationsStores.js.map +1 -1
  144. package/lib/cjs/utils/getPropertiesStores.js.map +1 -1
  145. package/lib/cjs/utils/getRequiredProperties.js.map +1 -1
  146. package/lib/cjs/utils/getSpec.js.map +1 -1
  147. package/lib/cjs/utils/getSpecType.js.map +1 -1
  148. package/lib/cjs/utils/inlineEnums.js +11 -0
  149. package/lib/cjs/utils/inlineEnums.js.map +1 -0
  150. package/lib/cjs/utils/isSuccessStatus.js.map +1 -1
  151. package/lib/cjs/utils/mapHeaders.js.map +1 -1
  152. package/lib/cjs/utils/mapNullableType.js.map +1 -1
  153. package/lib/cjs/utils/mapOpenSpec.js.map +1 -1
  154. package/lib/cjs/utils/mapOpenSpec2.js.map +1 -1
  155. package/lib/cjs/utils/mapOpenSpec3.js.map +1 -1
  156. package/lib/cjs/utils/mapOpenSpecInfo.js.map +1 -1
  157. package/lib/cjs/utils/mapRouteOptions.js.map +1 -1
  158. package/lib/cjs/utils/matchGroups.js.map +1 -1
  159. package/lib/cjs/utils/mergeOperation.js.map +1 -1
  160. package/lib/cjs/utils/mergeSpec.js.map +1 -1
  161. package/lib/cjs/utils/operationIdFormatter.js.map +1 -1
  162. package/lib/cjs/utils/ref.js.map +1 -1
  163. package/lib/cjs/utils/serializeEnumValues.js.map +1 -1
  164. package/lib/cjs/utils/toJsonMapCollection.js.map +1 -1
  165. package/lib/cjs/utils/toJsonRegex.js.map +1 -1
  166. package/lib/cjs/utils/transformToOS2.js.map +1 -1
  167. package/lib/cjs/utils/withErrorMsg.js.map +1 -1
  168. package/lib/esm/components/anyMapper.js.map +1 -1
  169. package/lib/esm/components/classMapper.js.map +1 -1
  170. package/lib/esm/components/genericsMapper.js.map +1 -1
  171. package/lib/esm/components/inheritedClassMapper.js.map +1 -1
  172. package/lib/esm/components/itemMapper.js.map +1 -1
  173. package/lib/esm/components/lazyRefMapper.js.map +1 -1
  174. package/lib/esm/components/mapMapper.js.map +1 -1
  175. package/lib/esm/components/objectMapper.js.map +1 -1
  176. package/lib/esm/components/ofMapper.js.map +1 -1
  177. package/lib/esm/components/propertiesMapper.js.map +1 -1
  178. package/lib/esm/components/schemaMapper.js +2 -0
  179. package/lib/esm/components/schemaMapper.js.map +1 -1
  180. package/lib/esm/constants/httpMethods.js.map +1 -1
  181. package/lib/esm/constants/httpStatusMessages.js.map +1 -1
  182. package/lib/esm/decorators/class/children.js.map +1 -1
  183. package/lib/esm/decorators/class/discriminatorValue.js.map +1 -1
  184. package/lib/esm/decorators/collections/collectionContains.js.map +1 -1
  185. package/lib/esm/decorators/collections/collectionOf.js.map +1 -1
  186. package/lib/esm/decorators/collections/maxItems.js.map +1 -1
  187. package/lib/esm/decorators/collections/maxProperties.js.map +1 -1
  188. package/lib/esm/decorators/collections/minItems.js.map +1 -1
  189. package/lib/esm/decorators/collections/minProperties.js.map +1 -1
  190. package/lib/esm/decorators/collections/uniqueItems.js.map +1 -1
  191. package/lib/esm/decorators/common/additionalProperties.js.map +1 -1
  192. package/lib/esm/decorators/common/allOf.js.map +1 -1
  193. package/lib/esm/decorators/common/allow.js.map +1 -1
  194. package/lib/esm/decorators/common/any.js.map +1 -1
  195. package/lib/esm/decorators/common/anyOf.js.map +1 -1
  196. package/lib/esm/decorators/common/const.js.map +1 -1
  197. package/lib/esm/decorators/common/customKey.js.map +1 -1
  198. package/lib/esm/decorators/common/default.js.map +1 -1
  199. package/lib/esm/decorators/common/defaultMsg.js.map +1 -1
  200. package/lib/esm/decorators/common/description.js.map +1 -1
  201. package/lib/esm/decorators/common/discriminatorKey.js.map +1 -1
  202. package/lib/esm/decorators/common/enum.js.map +1 -1
  203. package/lib/esm/decorators/common/errorMsg.js.map +1 -1
  204. package/lib/esm/decorators/common/example.js.map +1 -1
  205. package/lib/esm/decorators/common/examples.js.map +1 -1
  206. package/lib/esm/decorators/common/exclusiveMaximum.js.map +1 -1
  207. package/lib/esm/decorators/common/exclusiveMinimum.js.map +1 -1
  208. package/lib/esm/decorators/common/format.js.map +1 -1
  209. package/lib/esm/decorators/common/forwardGroups.js.map +1 -1
  210. package/lib/esm/decorators/common/groups.js.map +1 -1
  211. package/lib/esm/decorators/common/hidden.js.map +1 -1
  212. package/lib/esm/decorators/common/ignore.js.map +1 -1
  213. package/lib/esm/decorators/common/integer.js.map +1 -1
  214. package/lib/esm/decorators/common/jsonEntityFn.js.map +1 -1
  215. package/lib/esm/decorators/common/maxLength.js.map +1 -1
  216. package/lib/esm/decorators/common/maximum.js.map +1 -1
  217. package/lib/esm/decorators/common/minLength.js.map +1 -1
  218. package/lib/esm/decorators/common/minimum.js.map +1 -1
  219. package/lib/esm/decorators/common/multipleOf.js.map +1 -1
  220. package/lib/esm/decorators/common/name.js.map +1 -1
  221. package/lib/esm/decorators/common/nullable.js.map +1 -1
  222. package/lib/esm/decorators/common/oneOf.js.map +1 -1
  223. package/lib/esm/decorators/common/optional.js.map +1 -1
  224. package/lib/esm/decorators/common/pattern.js.map +1 -1
  225. package/lib/esm/decorators/common/property.js.map +1 -1
  226. package/lib/esm/decorators/common/readOnly.js.map +1 -1
  227. package/lib/esm/decorators/common/recordOf.js.map +1 -1
  228. package/lib/esm/decorators/common/required.js.map +1 -1
  229. package/lib/esm/decorators/common/requiredGroups.js.map +1 -1
  230. package/lib/esm/decorators/common/schema.js.map +1 -1
  231. package/lib/esm/decorators/common/title.js.map +1 -1
  232. package/lib/esm/decorators/common/typeError.js.map +1 -1
  233. package/lib/esm/decorators/common/writeOnly.js.map +1 -1
  234. package/lib/esm/decorators/config/jsonEntityComponent.js.map +1 -1
  235. package/lib/esm/decorators/generics/genericOf.js.map +1 -1
  236. package/lib/esm/decorators/generics/generics.js.map +1 -1
  237. package/lib/esm/decorators/operations/acceptMime.js.map +1 -1
  238. package/lib/esm/decorators/operations/consumes.js.map +1 -1
  239. package/lib/esm/decorators/operations/contentType.js.map +1 -1
  240. package/lib/esm/decorators/operations/deprecated.js.map +1 -1
  241. package/lib/esm/decorators/operations/header.js.map +1 -1
  242. package/lib/esm/decorators/operations/in.js.map +1 -1
  243. package/lib/esm/decorators/operations/inFile.js.map +1 -1
  244. package/lib/esm/decorators/operations/location.js.map +1 -1
  245. package/lib/esm/decorators/operations/operationId.js.map +1 -1
  246. package/lib/esm/decorators/operations/operationPath.js.map +1 -1
  247. package/lib/esm/decorators/operations/partial.js.map +1 -1
  248. package/lib/esm/decorators/operations/path.js.map +1 -1
  249. package/lib/esm/decorators/operations/produces.js.map +1 -1
  250. package/lib/esm/decorators/operations/redirect.js.map +1 -1
  251. package/lib/esm/decorators/operations/returns.js.map +1 -1
  252. package/lib/esm/decorators/operations/route.js.map +1 -1
  253. package/lib/esm/decorators/operations/security.js.map +1 -1
  254. package/lib/esm/decorators/operations/status.js.map +1 -1
  255. package/lib/esm/decorators/operations/summary.js.map +1 -1
  256. package/lib/esm/decorators/operations/tags.js.map +1 -1
  257. package/lib/esm/decorators/operations/view.js.map +1 -1
  258. package/lib/esm/domain/DecoratorContext.js.map +1 -1
  259. package/lib/esm/domain/JsonAliasMap.js.map +1 -1
  260. package/lib/esm/domain/JsonClassStore.js.map +1 -1
  261. package/lib/esm/domain/JsonDiscriminator.js.map +1 -1
  262. package/lib/esm/domain/JsonEntityStore.js.map +1 -1
  263. package/lib/esm/domain/JsonFormatTypes.js.map +1 -1
  264. package/lib/esm/domain/JsonLazyRef.js.map +1 -1
  265. package/lib/esm/domain/JsonMap.js.map +1 -1
  266. package/lib/esm/domain/JsonMethodStore.js.map +1 -1
  267. package/lib/esm/domain/JsonOperation.js.map +1 -1
  268. package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -1
  269. package/lib/esm/domain/JsonOperationRoute.js.map +1 -1
  270. package/lib/esm/domain/JsonParameter.js.map +1 -1
  271. package/lib/esm/domain/JsonParameterStore.js.map +1 -1
  272. package/lib/esm/domain/JsonParameterTypes.js.map +1 -1
  273. package/lib/esm/domain/JsonPropertyStore.js.map +1 -1
  274. package/lib/esm/domain/JsonRequestBody.js.map +1 -1
  275. package/lib/esm/domain/JsonResponse.js.map +1 -1
  276. package/lib/esm/domain/JsonSchema.js +1 -1
  277. package/lib/esm/domain/JsonSchema.js.map +1 -1
  278. package/lib/esm/domain/SpecTypes.js.map +1 -1
  279. package/lib/esm/hooks/alterIgnore.js.map +1 -1
  280. package/lib/esm/hooks/alterOneOf.js.map +1 -1
  281. package/lib/esm/hooks/alterRequiredGroups.js.map +1 -1
  282. package/lib/esm/index.js +1 -0
  283. package/lib/esm/index.js.map +1 -1
  284. package/lib/esm/interfaces/IgnoreCallback.js.map +1 -1
  285. package/lib/esm/interfaces/JsonHookContext.js.map +1 -1
  286. package/lib/esm/interfaces/JsonOpenSpec.js.map +1 -1
  287. package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -1
  288. package/lib/esm/registries/JsonSchemaMapperContainer.js.map +1 -1
  289. package/lib/esm/registries/enumRegistries.js.map +1 -1
  290. package/lib/esm/utils/buildPath.js.map +1 -1
  291. package/lib/esm/utils/concatParameters.js.map +1 -1
  292. package/lib/esm/utils/concatPath.js.map +1 -1
  293. package/lib/esm/utils/defineStatusModel.js.map +1 -1
  294. package/lib/esm/utils/from.js.map +1 -1
  295. package/lib/esm/utils/generateSpec.js.map +1 -1
  296. package/lib/esm/utils/generics.js.map +1 -1
  297. package/lib/esm/utils/getComputedType.js +1 -1
  298. package/lib/esm/utils/getComputedType.js.map +1 -1
  299. package/lib/esm/utils/getInheritedStores.js.map +1 -1
  300. package/lib/esm/utils/getJsonEntityStore.js.map +1 -1
  301. package/lib/esm/utils/getJsonPathParameters.js.map +1 -1
  302. package/lib/esm/utils/getJsonSchema.js.map +1 -1
  303. package/lib/esm/utils/getJsonType.js.map +1 -1
  304. package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
  305. package/lib/esm/utils/getOperationsStores.js.map +1 -1
  306. package/lib/esm/utils/getPropertiesStores.js.map +1 -1
  307. package/lib/esm/utils/getRequiredProperties.js.map +1 -1
  308. package/lib/esm/utils/getSpec.js.map +1 -1
  309. package/lib/esm/utils/getSpecType.js.map +1 -1
  310. package/lib/esm/utils/inlineEnums.js +7 -0
  311. package/lib/esm/utils/inlineEnums.js.map +1 -0
  312. package/lib/esm/utils/isSuccessStatus.js.map +1 -1
  313. package/lib/esm/utils/mapHeaders.js.map +1 -1
  314. package/lib/esm/utils/mapNullableType.js.map +1 -1
  315. package/lib/esm/utils/mapOpenSpec.js.map +1 -1
  316. package/lib/esm/utils/mapOpenSpec2.js.map +1 -1
  317. package/lib/esm/utils/mapOpenSpec3.js.map +1 -1
  318. package/lib/esm/utils/mapOpenSpecInfo.js.map +1 -1
  319. package/lib/esm/utils/mapRouteOptions.js.map +1 -1
  320. package/lib/esm/utils/matchGroups.js.map +1 -1
  321. package/lib/esm/utils/mergeOperation.js.map +1 -1
  322. package/lib/esm/utils/mergeSpec.js.map +1 -1
  323. package/lib/esm/utils/operationIdFormatter.js.map +1 -1
  324. package/lib/esm/utils/ref.js.map +1 -1
  325. package/lib/esm/utils/serializeEnumValues.js.map +1 -1
  326. package/lib/esm/utils/toJsonMapCollection.js.map +1 -1
  327. package/lib/esm/utils/toJsonRegex.js.map +1 -1
  328. package/lib/esm/utils/transformToOS2.js.map +1 -1
  329. package/lib/esm/utils/withErrorMsg.js.map +1 -1
  330. package/lib/tsconfig.esm.tsbuildinfo +1 -0
  331. package/lib/tsconfig.tsbuildinfo +1 -0
  332. package/lib/types/domain/JsonAliasMap.d.ts +2 -2
  333. package/lib/types/domain/JsonMethodStore.d.ts +1 -1
  334. package/lib/types/domain/JsonParameterStore.d.ts +1 -1
  335. package/lib/types/domain/JsonPropertyStore.d.ts +1 -1
  336. package/lib/types/domain/JsonRequestBody.d.ts +1 -1
  337. package/lib/types/domain/JsonResponse.d.ts +1 -1
  338. package/lib/types/domain/JsonSchema.d.ts +1 -1
  339. package/lib/types/index.d.ts +1 -0
  340. package/lib/types/interfaces/JsonSchemaOptions.d.ts +1 -0
  341. package/lib/types/utils/generics.d.ts +2 -2
  342. package/lib/types/utils/getSpec.d.ts +1 -1
  343. package/lib/types/utils/inlineEnums.d.ts +3 -0
  344. package/lib/types/utils/withErrorMsg.d.ts +1 -1
  345. package/package.json +16 -15
  346. package/{tsconfig.compile.esm.json → tsconfig.esm.json} +15 -5
  347. package/coverage.json +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"anyMapper.js","sourceRoot":"","sources":["../../../src/components/anyMapper.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,qDAAgD;AAEhD,uFAA6F;AAC7F,gDAAqD;AACrD,sCAAmC;AAEnC,SAAgB,SAAS,CAAC,KAAU,EAAE,UAA6B,EAAE;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,YAAY,yBAAW,EAAE;QAChC,OAAO,IAAA,sCAAU,EAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,IAAI,KAAK,YAAY,uBAAU,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,uBAAU,EAAE;QAC1E,MAAM,UAAU,GAAe,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAEjD,OAAO,IAAA,WAAK,EAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAC/D;IAED,IAAI,QAAQ,IAAI,KAAK,EAAE;QACrB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;QAEzD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,WAAK,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAtBD,8BAsBC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions} from \"../utils/generics\";\nimport {toRef} from \"../utils/ref\";\n\nexport function anyMapper(input: any, options: JsonSchemaOptions = {}): any {\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", input, options);\n }\n\n if (input instanceof JsonSchema && input.get(\"enum\") instanceof JsonSchema) {\n const enumSchema: JsonSchema = input.get(\"enum\");\n\n return toRef(enumSchema, enumSchema.toJSON(options), options);\n }\n\n if (\"toJSON\" in input) {\n const schema = input.toJSON(mapGenericsOptions(options));\n\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n\n return execMapper(\"object\", input, options);\n}\n\nregisterJsonSchemaMapper(\"any\", anyMapper);\n"]}
1
+ {"version":3,"file":"anyMapper.js","sourceRoot":"","sources":["../../../src/components/anyMapper.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,qDAAgD;AAEhD,uFAA6F;AAC7F,gDAAqD;AACrD,sCAAmC;AAEnC,SAAgB,SAAS,CAAC,KAAU,EAAE,UAA6B,EAAE;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAC/C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,KAAK,YAAY,yBAAW,EAAE;QAChC,OAAO,IAAA,sCAAU,EAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAC9C;IAED,IAAI,KAAK,YAAY,uBAAU,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,uBAAU,EAAE;QAC1E,MAAM,UAAU,GAAe,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAEjD,OAAO,IAAA,WAAK,EAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KAC/D;IAED,IAAI,QAAQ,IAAI,KAAK,EAAE;QACrB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;QAEzD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,WAAK,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;KAC9D;IAED,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAtBD,8BAsBC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"classMapper.js","sourceRoot":"","sources":["../../../src/components/classMapper.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAG1D,uFAA6F;AAC7F,gDAAkE;AAClE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EACL,KAAK,CAAC,MAAM,EACZ,IAAA,6BAAkB,EAAC;YACjB,GAAG,OAAO;YACV,IAAI,EAAE,KAAK;SACZ,CAAC,CACH,CAAC;KACH;IAED,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAxCD,kCAwCC;AAED,IAAA,oDAAwB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions, popGenerics} from \"../utils/generics\";\nimport {createRef, createRefName} from \"../utils/ref\";\n\nexport function classMapper(value: JsonSchema, options: JsonSchemaOptions) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n\n if (value.hasGenerics) {\n // Inline generic\n const {type, properties, additionalProperties, items, ...props} = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", store.schema, {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n\n if (schema.title) {\n const name = createRefName(schema.title, options);\n options.schemas![name] = schema;\n delete schema.title;\n\n return createRef(name, value, options);\n }\n\n return schema;\n }\n\n if (options.schemas && !options.schemas[name]) {\n options.schemas[name] = {}; // avoid infinite calls\n options.schemas[name] = execMapper(\n \"any\",\n store.schema,\n mapGenericsOptions({\n ...options,\n root: false\n })\n );\n }\n\n return createRef(name, value, options);\n}\n\nregisterJsonSchemaMapper(\"class\", classMapper);\n"]}
1
+ {"version":3,"file":"classMapper.js","sourceRoot":"","sources":["../../../src/components/classMapper.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAG1D,uFAA6F;AAC7F,gDAAkE;AAClE,sCAAsD;AAEtD,SAAgB,WAAW,CAAC,KAAiB,EAAE,OAA0B;IACv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AAK,GAAG;oBACZ,KAAK,EAAE,IAAI;iBACZ,CAAC;gBAEF,IAAI,OAAO,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvC,OAAO,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAY,EAAE;wBACvC,GAAG,OAAO;wBACV,QAAQ,EAAE,SAAS;qBACpB,CAAC,CAAC;iBACJ;gBAED,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAEhD,OAAO,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE;oBACxC,GAAG,OAAO;oBACV,GAAG,IAAA,sBAAW,EAAC,OAAO,CAAC;oBACvB,IAAI,EAAE,KAAK;iBACZ,CAAC,CAAC;aACJ;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAzDD,wCAyDC;AAED,IAAA,oDAAwB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {isClass, isPrimitiveClass} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {GenericsContext, popGenerics} from \"../utils/generics\";\nimport {getJsonType} from \"../utils/getJsonType\";\n\n/**\n * @ignore\n */\nexport function genericsMapper(obj: any, options: GenericsContext) {\n const {generics} = options;\n\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n\n if (isClass(type)) {\n const model = {\n class: type\n };\n\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", model as any, {\n ...options,\n generics: undefined\n });\n }\n\n const store = JsonEntityStore.from(model.class);\n\n return execMapper(\"schema\", store.schema, {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n"]}
1
+ {"version":3,"file":"genericsMapper.js","sourceRoot":"","sources":["../../../src/components/genericsMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAqD;AACrD,+DAA0D;AAC1D,uFAA6F;AAC7F,gDAA+D;AAC/D,sDAAiD;AAEjD;;GAEG;AACH,SAAgB,cAAc,CAAC,GAAQ,EAAE,OAAwB;IAC/D,MAAM,EAAC,QAAQ,EAAC,GAAG,OAAO,CAAC;IAE3B,IAAI,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE;QACxB,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC1B,IAAI,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAElC,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;gBAC1B,OAAO;oBACL,IAAI,EAAE,IAAA,yBAAW,EAAC,IAAI,CAAC;iBACxB,CAAC;aACH;YAED,IAAI,IAAI,KAAK,IAAI,EAAE;gBACjB,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,WAAW;iBACpB,CAAC;aACH;YAED,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,OAAO,IAAI,CAAC,MAAM,CAAC;oBACjB,GAAG,OAAO;oBACV,QAAQ,EAAE,SAAS;iBACpB,CAAC,CAAC;aACJ;YAED,IAAI,IAAI,KAAK,MAAM,EAAE;gBACnB,OAAO;oBACL,IAAI,EAAE,QAAQ;iBACf,CAAC;aACH;YAED,IAAI,IAAA,cAAO,EAAC,IAAI,CAAC,EAAE;gBACjB,MAAM,KAAK,GAAG;oBACZ,KAAK,EAAE,IAAI;iBACZ,CAAC;gBAEF,IAAI,OAAO,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,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACrE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,GAAG,GAAG,IAAA,gBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAZD,oDAYC;AAED,IAAA,oDAAwB,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import {classOf, deepMerge} from \"@tsed/core\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getInheritedStores} from \"../utils/getInheritedStores\";\n\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj: any, {target, ...options}: JsonSchemaOptions) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", store.schema, options));\n }, {});\n\n obj = deepMerge(schema, obj);\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n"]}
1
+ {"version":3,"file":"inheritedClassMapper.js","sourceRoot":"","sources":["../../../src/components/inheritedClassMapper.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAE9C,uFAA6F;AAC7F,oEAA+D;AAE/D;;GAEG;AACH,SAAgB,oBAAoB,CAAC,GAAQ,EAAE,EAAC,MAAM,EAAE,GAAG,OAAO,EAAoB;IACpF,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,KAAK,CAAC,KAAK,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC,CAAC;IAExH,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;YAC9C,OAAO,IAAA,gBAAS,EAAC,GAAG,EAAE,IAAA,sCAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACrE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,GAAG,GAAG,IAAA,gBAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAZD,oDAYC;AAED,IAAA,oDAAwB,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"itemMapper.js","sourceRoot":"","sources":["../../../src/components/itemMapper.ts"],"names":[],"mappings":";;;AACA,uFAA6F;AAE7F,SAAgB,UAAU,CAAC,KAAU,EAAE,OAA0B;IAC/D,OAAO,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1G,CAAC;AAFD,gCAEC;AAED,IAAA,oDAAwB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\nexport function itemMapper(value: any, options: JsonSchemaOptions) {\n return value && value.isClass ? execMapper(\"class\", value, options) : execMapper(\"any\", value, options);\n}\n\nregisterJsonSchemaMapper(\"item\", itemMapper);\n"]}
1
+ {"version":3,"file":"itemMapper.js","sourceRoot":"","sources":["../../../src/components/itemMapper.ts"],"names":[],"mappings":";;;AACA,uFAA6F;AAE7F,SAAgB,UAAU,CAAC,KAAU,EAAE,OAA0B;IAC/D,OAAO,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1G,CAAC;AAFD,gCAEC;AAED,IAAA,oDAAwB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lazyRefMapper.js","sourceRoot":"","sources":["../../../src/components/lazyRefMapper.ts"],"names":[],"mappings":";;;AAEA,uFAAiF;AACjF,gDAAqD;AACrD,sCAA8C;AAE9C,SAAgB,aAAa,CAAC,KAAkB,EAAE,OAA0B;IAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAExB,IAAI,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;IAEzD,OAAO,IAAA,WAAK,EAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAZD,sCAYC;AAED,IAAA,oDAAwB,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapGenericsOptions} from \"../utils/generics\";\nimport {createRef, toRef} from \"../utils/ref\";\n\nexport function lazyRefMapper(input: JsonLazyRef, options: JsonSchemaOptions) {\n const name = input.name;\n\n if (options.$refs?.find((t: any) => t === input.target)) {\n return createRef(name, input.schema, options);\n }\n\n options.$refs = [...(options.$refs || []), input.target];\n\n const schema = input.toJSON(mapGenericsOptions(options));\n\n return toRef(input.schema, schema, options);\n}\n\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n"]}
1
+ {"version":3,"file":"lazyRefMapper.js","sourceRoot":"","sources":["../../../src/components/lazyRefMapper.ts"],"names":[],"mappings":";;;AAEA,uFAAiF;AACjF,gDAAqD;AACrD,sCAA8C;AAE9C,SAAgB,aAAa,CAAC,KAAkB,EAAE,OAA0B;IAC1E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAExB,IAAI,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,OAAO,IAAA,eAAS,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/C;IAED,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;IAEzD,OAAO,IAAA,WAAK,EAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAZD,sCAYC;AAED,IAAA,oDAAwB,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mapMapper.js","sourceRoot":"","sources":["../../../src/components/mapMapper.ts"],"names":[],"mappings":";;;AAAA,gDAAqD;AAErD,uFAA6F;AAE7F;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAuB,EAAE,EAAC,MAAM,GAAG,EAAE,EAAE,GAAG,OAAO,EAAoB;IAC7F,OAAO,GAAG,IAAA,6BAAkB,EAAC,OAAO,CAAC,CAAC;IAEtC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACnE,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,OAAO,GAAG,CAAC;SACZ;QAED,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAXD,8BAWC;AAED,IAAA,oDAAwB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {mapGenericsOptions} from \"../utils/generics\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\n\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input: Map<string, any>, {ignore = [], ...options}: JsonSchemaOptions): any {\n options = mapGenericsOptions(options);\n\n return Array.from(input.entries()).reduce((obj: any, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n\n obj[key] = execMapper(\"item\", value, options);\n return obj;\n }, {});\n}\n\nregisterJsonSchemaMapper(\"map\", mapMapper);\n"]}
1
+ {"version":3,"file":"mapMapper.js","sourceRoot":"","sources":["../../../src/components/mapMapper.ts"],"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IAAA,yBAAW,EAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YAClE,MAAM,IAAI,GAAG;gBACX,GAAG,OAAO;gBACV,MAAM,EAAE,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;aACpF,CAAC;YAEF,oEAAoE;YACpE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3C,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,iCAAe,EAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;SACnD;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EACD,IAAA,cAAO,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CACzB,CAAC;AACJ,CAAC;AApBD,oCAoBC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import {isArray} from \"@tsed/core\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {alterIgnore} from \"../hooks/alterIgnore\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {mapNullableType} from \"../utils/mapNullableType\";\n\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input: any, options: JsonSchemaOptions) {\n const {specType, operationIdFormatter, root, schemas, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx} = options;\n\n return Object.entries(input).reduce<any>(\n (obj, [key, value]: [string, any | JsonSchema]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n const opts = {\n ...options,\n groups: input?.$forwardGroups || value?.$forwardGroups ? options.groups : undefined\n };\n\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", value, opts);\n obj[key] = mapNullableType(obj[key], value, opts);\n }\n\n return obj;\n },\n isArray(input) ? [] : {}\n );\n}\n\nregisterJsonSchemaMapper(\"object\", objectMapper);\n"]}
1
+ {"version":3,"file":"objectMapper.js","sourceRoot":"","sources":["../../../src/components/objectMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAEnC,sDAAiD;AAEjD,uFAA6F;AAC7F,8DAAyD;AAEzD;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAAU,EAAE,OAA0B;IACjE,MAAM,EAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,GAAG,EAAC,GAAG,OAAO,CAAC;IAE/H,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CACjC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAA6B,EAAE,EAAE;QAChD,IAAI,OAAO,CAAC,gBAAgB,KAAK,KAAK,IAAI,CAAC,IAAA,yBAAW,EAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YAClE,MAAM,IAAI,GAAG;gBACX,GAAG,OAAO;gBACV,MAAM,EAAE,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;aACpF,CAAC;YAEF,oEAAoE;YACpE,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3C,GAAG,CAAC,GAAG,CAAC,GAAG,IAAA,iCAAe,EAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;SACnD;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EACD,IAAA,cAAO,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CACzB,CAAC;AACJ,CAAC;AApBD,oCAoBC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ofMapper.js","sourceRoot":"","sources":["../../../src/components/ofMapper.ts"],"names":[],"mappings":";;;AAAA,uFAA6F;AAI7F,SAAgB,QAAQ,CAAC,KAA2B,EAAE,OAA0B,EAAE,MAAkB;IAClG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAuB,EAAE,EAAE;QAC3C,OAAO,IAAA,sCAAU,EAAC,MAAM,EAAE,KAAK,EAAE;YAC/B,GAAG,OAAO;YACV,aAAa,EAAE,MAAM,CAAC,aAAa;SACpC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,4BAOC;AAED,IAAA,oDAAwB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC5C,IAAA,oDAAwB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC5C,IAAA,oDAAwB,EAAC,OAAO,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["import {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nexport function ofMapper(input: (any | JsonSchema)[], options: JsonSchemaOptions, parent: JsonSchema) {\n return input.map((value: any | JsonSchema) => {\n return execMapper(\"item\", value, {\n ...options,\n genericLabels: parent.genericLabels\n });\n });\n}\n\nregisterJsonSchemaMapper(\"anyOf\", ofMapper);\nregisterJsonSchemaMapper(\"allOf\", ofMapper);\nregisterJsonSchemaMapper(\"oneOf\", ofMapper);\n"]}
1
+ {"version":3,"file":"ofMapper.js","sourceRoot":"","sources":["../../../src/components/ofMapper.ts"],"names":[],"mappings":";;;AAAA,uFAA6F;AAI7F,SAAgB,QAAQ,CAAC,KAA2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AAC;AAC3D,IAAA,oDAAwB,EAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAChE,IAAA,oDAAwB,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAC9D,IAAA,oDAAwB,EAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAClD,IAAA,oDAAwB,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import {execMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nexport function propertiesMapper(input: any | JsonSchema, options: JsonSchemaOptions, parent: JsonSchema) {\n if (input.isClass) {\n return execMapper(\"class\", input, options);\n }\n\n return execMapper(\"any\", input, {\n ...options,\n genericLabels: parent.genericLabels\n });\n}\n\nregisterJsonSchemaMapper(\"properties\", propertiesMapper);\nregisterJsonSchemaMapper(\"items\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"propertyNames\", propertiesMapper);\nregisterJsonSchemaMapper(\"contains\", propertiesMapper);\nregisterJsonSchemaMapper(\"dependencies\", propertiesMapper);\nregisterJsonSchemaMapper(\"patternProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalItems\", propertiesMapper);\nregisterJsonSchemaMapper(\"not\", propertiesMapper);\nregisterJsonSchemaMapper(\"definitions\", propertiesMapper);\n"]}
1
+ {"version":3,"file":"propertiesMapper.js","sourceRoot":"","sources":["../../../src/components/propertiesMapper.ts"],"names":[],"mappings":";;;AAAA,uFAA6F;AAI7F,SAAgB,gBAAgB,CAAC,KAAuB,EAAE,OAA0B,EAAE,MAAkB;IACtG,IAAI,KAAK,CAAC,OAAO,EAAE;QACjB,OAAO,IAAA,sCAAU,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAC5C;IAED,OAAO,IAAA,sCAAU,EAAC,KAAK,EAAE,KAAK,EAAE;QAC9B,GAAG,OAAO;QACV,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAC;AACL,CAAC;AATD,4CASC;AAED,IAAA,oDAAwB,EAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AACzD,IAAA,oDAAwB,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACpD,IAAA,oDAAwB,EAAC,sBAAsB,EAAE,gBAAgB,CAAC,CAAC;AACnE,IAAA,oDAAwB,EAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAC5D,IAAA,oDAAwB,EAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AACvD,IAAA,oDAAwB,EAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAC3D,IAAA,oDAAwB,EAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAChE,IAAA,oDAAwB,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAC9D,IAAA,oDAAwB,EAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAClD,IAAA,oDAAwB,EAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC"}
@@ -7,6 +7,7 @@ const SpecTypes_1 = require("../domain/SpecTypes");
7
7
  const JsonSchemaMapperContainer_1 = require("../registries/JsonSchemaMapperContainer");
8
8
  const getRequiredProperties_1 = require("../utils/getRequiredProperties");
9
9
  const alterOneOf_1 = require("../hooks/alterOneOf");
10
+ const inlineEnums_1 = require("../utils/inlineEnums");
10
11
  const mapNullableType_1 = require("../utils/mapNullableType");
11
12
  /**
12
13
  * @ignore
@@ -88,6 +89,7 @@ function schemaMapper(schema, options) {
88
89
  obj = (0, getRequiredProperties_1.getRequiredProperties)(obj, schema, { ...options, useAlias });
89
90
  obj = (0, mapNullableType_1.mapNullableType)(obj, schema, options);
90
91
  obj = (0, alterOneOf_1.alterOneOf)(obj, schema, options);
92
+ obj = (0, inlineEnums_1.inlineEnums)(obj, schema, options);
91
93
  return obj;
92
94
  }
93
95
  exports.schemaMapper = schemaMapper;
@@ -1 +1 @@
1
- {"version":3,"file":"schemaMapper.js","sourceRoot":"","sources":["../../../src/components/schemaMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AACpC,yDAA4D;AAE5D,mDAA8C;AAE9C,uFAAwG;AACxG,0EAAqE;AACrE,oDAA+C;AAC/C,8DAAyD;AAEzD;;GAEG;AACH,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,IAAI,CAAC,CAAC;AACzH;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,CAAC;AAEnC;;GAEG;AACH,SAAS,iBAAiB,CAAC,GAAW,EAAE,KAAU;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvI,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,GAAW,EAAE,KAAU,EAAE,QAAiB;IAChE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACvG,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,GAAW,EAAE,EAAC,QAAQ,GAAG,qBAAS,CAAC,IAAI,EAAE,UAAU,GAAG,KAAK,EAAoB;IACpG,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;QACrB,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,KAAK,IAAI,QAAQ,KAAK,qBAAS,CAAC,IAAI,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AE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,GAAG,GAAG,IAAA,uBAAU,EAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC,OAAO,GAAG,CAAC;AACb,CAAC;AA/DD,oCA+DC;AAED,IAAA,oDAAwB,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import {isObject} from \"@tsed/core\";\nimport {mapAliasedProperties} from \"../domain/JsonAliasMap\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper, hasMapper, registerJsonSchemaMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getRequiredProperties} from \"../utils/getRequiredProperties\";\nimport {alterOneOf} from \"../hooks/alterOneOf\";\nimport {mapNullableType} from \"../utils/mapNullableType\";\n\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [\"const\"];\n\n/**\n * @ignore\n */\nfunction isEmptyProperties(key: string, value: any) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n\n/**\n * @ignore\n */\nfunction shouldMapAlias(key: string, value: any, useAlias: boolean) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n\n/**\n * @ignore\n */\nfunction shouldSkipKey(key: string, {specType = SpecTypes.JSON, customKeys = false}: JsonSchemaOptions) {\n return (\n IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key))\n );\n}\n\nfunction isExample(key: string, value: any, options: JsonSchemaOptions) {\n return key === \"examples\" && isObject(value) && SpecTypes.OPENAPI === options.specType!;\n}\n\nexport function schemaMapper(schema: JsonSchema, options: JsonSchemaOptions): any {\n const {useAlias = true, schemas = {}} = options;\n options = {\n ...options,\n useAlias,\n schemas\n };\n\n let obj: any = [...schema.keys()]\n .filter((key) => !shouldSkipKey(key, options))\n .reduce((item: any, key) => {\n let value = schema.get(key);\n\n key = key.replace(/^#/, \"\");\n\n if (key === \"type\") {\n return {\n ...item,\n [key]: schema.getJsonType()\n };\n }\n\n if (isExample(key, value, options)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n\n if (value && typeof value === \"object\" && hasMapper(key)) {\n value = execMapper(key, value, options, schema);\n\n if (isEmptyProperties(key, value)) {\n return item;\n }\n\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n }\n\n return {\n ...item,\n [key]: value\n };\n }, {});\n\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", obj, {...options, root: false, schemas, target: schema.getComputedType()});\n }\n\n obj = execMapper(\"generics\", obj, {...options, root: false, schemas} as any);\n\n if (schema.has(options.specType as string)) {\n obj = {\n ...obj,\n ...schema.get(options.specType as string).toJSON(options)\n };\n }\n\n obj = getRequiredProperties(obj, schema, {...options, useAlias});\n obj = mapNullableType(obj, schema, options);\n obj = alterOneOf(obj, schema, options);\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n"]}
1
+ {"version":3,"file":"schemaMapper.js","sourceRoot":"","sources":["../../../src/components/schemaMapper.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AACpC,yDAA4D;AAE5D,mDAA8C;AAE9C,uFAAwG;AACxG,0EAAqE;AACrE,oDAA+C;AAC/C,sDAAiD;AACjD,8DAAyD;AAEzD;;GAEG;AACH,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,OAAO,EAAE,qBAAS,CAAC,IA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QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,UAAU;IACV,SAAS;IACT,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACZ,OAAO;IACP,MAAM;IACN,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,YAAY;CACb,CAAC;AAEF,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,iCAAa,CAAA;IACb,+BAAW,CAAA;IACX,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B","sourcesContent":["export const HTTP_METHODS = [\n \"all\",\n \"checkout\",\n \"connect\",\n \"copy\",\n \"delete\",\n \"get\",\n \"head\",\n \"lock\",\n \"merge\",\n \"mkactivity\",\n \"mkcol\",\n \"move\",\n \"m-search\",\n \"notify\",\n \"options\",\n \"param\",\n \"patch\",\n \"post\",\n \"propfind\",\n \"propatch\",\n \"purge\",\n \"put\",\n \"report\",\n \"search\",\n \"subscribe\",\n \"trace\",\n \"unlock\",\n \"unsuscribe\"\n];\n\nexport enum OperationMethods {\n ALL = \"ALL\", // special key\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n PATCH = \"PATCH\",\n HEAD = \"HEAD\",\n DELETE = \"DELETE\",\n OPTIONS = \"OPTIONS\",\n CUSTOM = \"CUSTOM\"\n}\n"]}
1
+ {"version":3,"file":"httpMethods.js","sourceRoot":"","sources":["../../../src/constants/httpMethods.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,UAAU;IACV,SAAS;IACT,MAAM;IACN,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACZ,OAAO;IACP,MAAM;IACN,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,OAAO;IACP,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,YAAY;CACb,CAAC;AAEF,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,iCAAa,CAAA;IACb,+BAAW,CAAA;IACX,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":";;;;AAAA,gEAAgC;AAChC,6CAAyC;AAE5B,QAAA,oBAAoB,GAAG,kBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAkD,EAAE,IAAY,EAAE,EAAE;IAC7H,MAAM,OAAO,GAAW,MAAM,CAAC,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,OAAO;QACL,GAAG,GAAG;QACN,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAA,0BAAY,EAAC,OAAO,CAAC,EAAC;KAC9D,CAAC;AACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AAEP,4BAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC;AAC9C,4BAAoB,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC;AAE7C,SAAgB,iBAAiB,CAAC,MAAuB;IACvD,OAAQ,4BAA4B,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;AACrD,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,MAAuB;IACtD,OAAQ,4BAA4B,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;AACtD,CAAC;AAFD,4CAEC","sourcesContent":["import statuses from \"statuses\";\nimport {constantCase} from \"change-case\";\n\nexport const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map: Record<string, {label: string; code: string}>, code: number) => {\n const message: string = String(statuses(code));\n return {\n ...map,\n [String(code)]: {label: message, code: constantCase(message)}\n };\n}, {});\n\nHTTP_STATUS_MESSAGES[\"200\"].label = \"Success\";\nHTTP_STATUS_MESSAGES[\"200\"].code = \"SUCCESS\";\n\nexport function getStatusConstant(status: number | string) {\n return (HTTP_STATUS_MESSAGES as any)[status]?.code;\n}\n\nexport function getStatusMessage(status: number | string) {\n return (HTTP_STATUS_MESSAGES as any)[status]?.label;\n}\n"]}
1
+ {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":";;;;AAAA,gEAAgC;AAChC,6CAAyC;AAE5B,QAAA,oBAAoB,GAAG,kBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAkD,EAAE,IAAY,EAAE,EAAE;IAC7H,MAAM,OAAO,GAAW,MAAM,CAAC,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,OAAO;QACL,GAAG,GAAG;QACN,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAA,0BAAY,EAAC,OAAO,CAAC,EAAC;KAC9D,CAAC;AACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AAEP,4BAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC;AAC9C,4BAAoB,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC;AAE7C,SAAgB,iBAAiB,CAAC,MAAuB;IACvD,OAAQ,4BAA4B,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;AACrD,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,MAAuB;IACtD,OAAQ,4BAA4B,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;AACtD,CAAC;AAFD,4CAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"children.js","sourceRoot":"","sources":["../../../../src/decorators/class/children.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,yDAAoD;AAEpD;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,GAAG,QAAqB;IAC/C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;QAEjD,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC9B,YAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AARD,4BAQC","sourcesContent":["import {Store, Type} from \"@tsed/core\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children: Type<any>[]): ClassDecorator {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n"]}
1
+ {"version":3,"file":"children.js","sourceRoot":"","sources":["../../../../src/decorators/class/children.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,yDAAoD;AAEpD;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,GAAG,QAAqB;IAC/C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;QAEjD,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC9B,YAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AARD,4BAQC"}
@@ -1 +1 @@
1
- {"version":3,"file":"discriminatorValue.js","sourceRoot":"","sources":["../../../../src/decorators/class/discriminatorValue.ts"],"names":[],"mappings":";;;AAAA,6CAAsC;AACtC,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,kBAAkB,CAAC,KAAc,EAAE,GAAG,MAAgB;IACpE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,GAAG,KAAK,IAAI,IAAA,uBAAS,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,KAAK,CAAC,qBAAqB,EAAE;YAC/B,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,CAAC;SACnD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,gDAOC","sourcesContent":["import {snakeCase} from \"change-case\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn\";\n\n/**\n * Declare a Discriminator value on a child class.\n *\n * ```ts\n * export class Event {\n * @DiscriminatorKey() // declare this property a discriminator key\n * type: string;\n *\n * @Property()\n * value: string;\n * }\n *\n * @DiscriminatorValue(\"page_view\")\n * export class PageView extends Event {\n * @Required()\n * url: string;\n * }\n *\n * @DiscriminatorValue(\"action\")\n * export class Action extends Event {\n * @Required()\n * event: string;\n * }\n *\n * @DiscriminatorValue()\n * export class CustomAction extends Event {\n * @Required()\n * event: string;\n *\n * @Property()\n * meta: string;\n * }\n * ```\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param value\n * @param values\n */\nexport function DiscriminatorValue(value?: string, ...values: string[]): ClassDecorator {\n return JsonEntityFn((store) => {\n value = value || snakeCase(store.targetName);\n if (store.discriminatorAncestor) {\n store.schema.discriminatorValue(value, ...values);\n }\n });\n}\n"]}
1
+ {"version":3,"file":"discriminatorValue.js","sourceRoot":"","sources":["../../../../src/decorators/class/discriminatorValue.ts"],"names":[],"mappings":";;;AAAA,6CAAsC;AACtC,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,kBAAkB,CAAC,KAAc,EAAE,GAAG,MAAgB;IACpE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,GAAG,KAAK,IAAI,IAAA,uBAAS,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,KAAK,CAAC,qBAAqB,EAAE;YAC/B,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,CAAC;SACnD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,gDAOC"}
@@ -1 +1 @@
1
- {"version":3,"file":"collectionContains.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionContains.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,kBAAkB,CAAC,IAAS;IAC1C,OAAO,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AACvC,CAAC;AAFD,gDAEC","sourcesContent":["import {CollectionOf} from \"./collectionOf\";\n\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type: any) {\n return CollectionOf(type).Contains();\n}\n"]}
1
+ {"version":3,"file":"collectionContains.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionContains.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,kBAAkB,CAAC,IAAS;IAC1C,OAAO,IAAA,2BAAY,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AACvC,CAAC;AAFD,gDAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"collectionOf.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionOf.ts"],"names":[],"mappings":";;;AAAA,kEAA6D;AAkE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,YAAY,CAAC,IAAS,EAAE,cAAoB;IAC1D,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CACb,iJAAiJ,CAClJ,CAAC;KACH;IAED,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,IAAI,QAAQ,GAAY,KAAK,CAAC;IAE9B,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5C,IAAI,cAAc,EAAE;YAClB,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;YACtC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnC;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,UAAU,CAAC,IAAI,C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AIG;AACH,SAAgB,OAAO,CAAC,IAAS;IAC/B,OAAO,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,IAAS;IAC7B,OAAO,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC;AAFD,sBAEC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\n\nexport interface ArrayOfChainedDecorators {\n (...args: any): any;\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 MinItems(minItems: number): this;\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 MaxItems(maxItems: number): this;\n\n /**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n */\n Contains(): this;\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 UniqueItems(uniqueItems?: boolean): this;\n}\n\nexport interface MapOfChainedDecorators {\n (...args: any): any;\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 MinProperties(minProperties: number): this;\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 MaxProperties(maxProperties: number): this;\n}\n\nexport interface CollectionOfChainedDecorators extends MapOfChainedDecorators, ArrayOfChainedDecorators {}\n\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type: any, collectionType?: any): CollectionOfChainedDecorators {\n if (!type) {\n throw new Error(\n \"A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.\"\n );\n }\n\n const schema: any = {};\n let contains: boolean = false;\n\n const decorator = (...args: any) => {\n const store = JsonEntityStore.from(...args);\n\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n\n store.type = type;\n store.itemSchema.type(type);\n\n store.schema.assign(schema);\n\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n\n decorator.MinItems = (minItems: number) => {\n schema.minItems = minItems;\n\n return decorator;\n };\n\n decorator.MaxItems = (maxItems: number) => {\n schema.maxItems = maxItems;\n\n return decorator;\n };\n decorator.MinProperties = (minProperties: number) => {\n schema.minProperties = minProperties;\n\n return decorator;\n };\n\n decorator.MaxProperties = (maxProperties: number) => {\n schema.maxProperties = maxProperties;\n\n return decorator;\n };\n\n decorator.Contains = () => {\n contains = true;\n\n return decorator;\n };\n\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n\n return decorator;\n };\n\n return decorator;\n}\n\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type: any): ArrayOfChainedDecorators {\n return CollectionOf(type, Array);\n}\n\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type: any): MapOfChainedDecorators {\n return CollectionOf(type, Map);\n}\n"]}
1
+ {"version":3,"file":"collectionOf.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionOf.ts"],"names":[],"mappings":";;;AAAA,kEAA6D;AAkE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,YAAY,CAAC,IAAS,EAAE,cAAoB;IAC1D,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CACb,iJAAiJ,CAClJ,CAAC;KACH;IAED,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,IAAI,QAAQ,GAAY,KAAK,CAAC;IAE9B,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,iCAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5C,IAAI,cAAc,EAAE;YAClB,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;YACtC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnC;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE5B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,KAAK,CAAC,OAAO,IAAI,QAAQ,EAAE;YAC7B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YACxD,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC;IAEF,SAAS,CAAC,QAAQ,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAE3B,OAAO,SAAS,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GAAG,IAAA,2BAAY,EAAC,UAAU,EAAE,CAAC,QAAgB,EAAE,EAAE;IACpE,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,IAAA,2BAAY,EAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {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 * @ajv-errors\n */\nexport const MaxItems = withErrorMsg(\"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"]}
1
+ {"version":3,"file":"maxItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxItems.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACU,QAAA,QAAQ,GAAG,IAAA,2BAAY,EAAC,UAAU,EAAE,CAAC,QAAgB,EAAE,EAAE;IACpE,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,IAAA,2BAAY,EAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"maxProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxProperties.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACU,QAAA,aAAa,GAAG,IAAA,2BAAY,EAAC,eAAe,EAAE,CAAC,aAAqB,EAAE,EAAE;IACnF,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,IAAA,2BAAY,EAAC,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,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {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 * @ajv-errors\n */\nexport const MaxProperties = withErrorMsg(\"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"]}
1
+ {"version":3,"file":"maxProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/maxProperties.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACU,QAAA,aAAa,GAAG,IAAA,2BAAY,EAAC,eAAe,EAAE,CAAC,aAAqB,EAAE,EAAE;IACnF,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,IAAA,2BAAY,EAAC,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,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"minItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minItems.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACU,QAAA,QAAQ,GAAG,IAAA,2BAAY,EAAC,UAAU,EAAE,CAAC,QAAgB,EAAE,EAAE;IACpE,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,IAAA,2BAAY,EAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {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 * @ajv-errors\n */\nexport const MinItems = withErrorMsg(\"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"]}
1
+ {"version":3,"file":"minItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minItems.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACU,QAAA,QAAQ,GAAG,IAAA,2BAAY,EAAC,UAAU,EAAE,CAAC,QAAgB,EAAE,EAAE;IACpE,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,OAAO,IAAA,2BAAY,EAAC,CAAC,UAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"minProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minProperties.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,aAAa,GAAG,IAAA,2BAAY,EAAC,eAAe,EAAE,CAAC,aAAqB,EAAE,EAAE;IACnF,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,IAAA,2BAAY,EAAC,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,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {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 * @ajv-errors\n */\nexport const MinProperties = withErrorMsg(\"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"]}
1
+ {"version":3,"file":"minProperties.js","sourceRoot":"","sources":["../../../../src/decorators/collections/minProperties.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,aAAa,GAAG,IAAA,2BAAY,EAAC,eAAe,EAAE,CAAC,aAAqB,EAAE,EAAE;IACnF,IAAI,aAAa,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;KAC/E;IAED,OAAO,IAAA,2BAAY,EAAC,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,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"uniqueItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/uniqueItems.ts"],"names":[],"mappings":";;;AACA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACU,QAAA,WAAW,GAAG,IAAA,2BAAY,EAAC,aAAa,EAAE,CAAC,cAAuB,IAAI,EAAE,EAAE;IACrF,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg\";\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 * @ajv-errors\n */\nexport const UniqueItems = withErrorMsg(\"uniqueItems\", (uniqueItems: boolean = true) => {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.uniqueItems(uniqueItems);\n });\n});\n"]}
1
+ {"version":3,"file":"uniqueItems.js","sourceRoot":"","sources":["../../../../src/decorators/collections/uniqueItems.ts"],"names":[],"mappings":";;;AACA,2DAAsD;AACtD,yDAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACU,QAAA,WAAW,GAAG,IAAA,2BAAY,EAAC,aAAa,EAAE,CAAC,cAAuB,IAAI,EAAE,EAAE;IACrF,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"additionalProperties.js","sourceRoot":"","sources":["../../../../src/decorators/common/additionalProperties.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAC,MAA+B;IAClE,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,oDAIC","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"]}
1
+ {"version":3,"file":"additionalProperties.js","sourceRoot":"","sources":["../../../../src/decorators/common/additionalProperties.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAC,MAA+B;IAClE,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,oDAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"allOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/allOf.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;GAUG;AACH,SAAgB,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC","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"]}
1
+ {"version":3,"file":"allOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/allOf.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;GAUG;AACH,SAAgB,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"allow.js","sourceRoot":"","sources":["../../../../src/decorators/common/allow.ts"],"names":[],"mappings":";;;AAAA,qCAAkE;AAClE,iDAA4C;AAC5C,yCAAoC;AAGpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,KAAK,CAAC,GAAG,MAAa;IACpC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IACnD,OAAO,IAAA,oBAAa,EAClB,KAAK,IAAI,IAAA,mBAAQ,EAAC,KAAK,CAAC,EACxB,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAC3B,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;QAE9B,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,KAAK,EAAE;YAC/C,KAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;SAC/C;QAED,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,IAAI,EAAE;YAC/C,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;SACpD;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAhBD,sBAgBC","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"]}
1
+ {"version":3,"file":"allow.js","sourceRoot":"","sources":["../../../../src/decorators/common/allow.ts"],"names":[],"mappings":";;;AAAA,qCAAkE;AAClE,iDAA4C;AAC5C,yCAAoC;AAGpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,KAAK,CAAC,GAAG,MAAa;IACpC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IACnD,OAAO,IAAA,oBAAa,EAClB,KAAK,IAAI,IAAA,mBAAQ,EAAC,KAAK,CAAC,EACxB,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAC3B,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;QAE9B,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,KAAK,EAAE;YAC/C,KAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;SAC/C;QAED,IAAI,KAAK,CAAC,aAAa,KAAK,qBAAc,CAAC,IAAI,EAAE;YAC/C,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;SACpD;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAhBD,sBAgBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"any.js","sourceRoot":"","sources":["../../../../src/decorators/common/any.ts"],"names":[],"mappings":";;;AAEA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,GAAG,CAAC,GAAG,KAAgD;IACrE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kBAIC","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"]}
1
+ {"version":3,"file":"any.js","sourceRoot":"","sources":["../../../../src/decorators/common/any.ts"],"names":[],"mappings":";;;AAEA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,SAAgB,GAAG,CAAC,GAAG,KAAgD;IACrE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kBAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"anyOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/anyOf.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,SAAgB,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC","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"]}
1
+ {"version":3,"file":"anyOf.js","sourceRoot":"","sources":["../../../../src/decorators/common/anyOf.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,SAAgB,KAAK,CAAC,GAAG,KAAsB;IAC7C,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/decorators/common/const.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,SAAgB,KAAK,CAAC,UAAiC;IACrD,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC","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"]}
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/decorators/common/const.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,SAAgB,KAAK,CAAC,UAAiC;IACrD,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"customKey.js","sourceRoot":"","sources":["../../../../src/decorators/common/customKey.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;;GAWG;AACH,SAAgB,SAAS,CAAC,GAAW,EAAE,KAAU;IAC/C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,8BAIC;AACD;;;;;;;;;;;GAWG;AACH,SAAgB,UAAU,CAAC,GAAwB;IACjD,OAAO,IAAA,2BAAY,EAAC,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;AAND,gCAMC","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"]}
1
+ {"version":3,"file":"customKey.js","sourceRoot":"","sources":["../../../../src/decorators/common/customKey.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;;;GAWG;AACH,SAAgB,SAAS,CAAC,GAAW,EAAE,KAAU;IAC/C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,8BAIC;AACD;;;;;;;;;;;GAWG;AACH,SAAgB,UAAU,CAAC,GAAwB;IACjD,OAAO,IAAA,2BAAY,EAAC,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;AAND,gCAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../src/decorators/common/default.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,SAAgB,OAAO,CAAC,YAA4C;IAClE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * There are no restrictions placed on the value of this keyword.\n *\n * ::: warning\n * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Default(\"10\")\n * property: string = \"10\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"default\": \"10\"\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} defaultValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Default(defaultValue: string | number | boolean | {}) {\n return JsonEntityFn((store) => {\n store.itemSchema.default(defaultValue);\n });\n}\n"]}
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../src/decorators/common/default.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,SAAgB,OAAO,CAAC,YAA4C;IAClE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultMsg.js","sourceRoot":"","sources":["../../../../src/decorators/common/defaultMsg.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AACzC,yCAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,UAAU,CAAC,OAAe;IACxC,OAAO,IAAA,oBAAa,EAAC,IAAA,mBAAQ,EAAC,EAAC,CAAC,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAFD,gCAEC","sourcesContent":["import {useDecorators} from \"@tsed/core\";\nimport {ErrorMsg} from \"./errorMsg\";\n\n/**\n * Set default error message.\n *\n * ## Example\n *\n * ```typescript\n * @DefaultMessage(\"foo should be a string\")\n * class Model {\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": \"number\"\n * }\n * \"errorMessage\": {\n * \"_\": \"foo should be a string\"\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function DefaultMsg(message: string): ClassDecorator {\n return useDecorators(ErrorMsg({_: message}));\n}\n"]}
1
+ {"version":3,"file":"defaultMsg.js","sourceRoot":"","sources":["../../../../src/decorators/common/defaultMsg.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AACzC,yCAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,UAAU,CAAC,OAAe;IACxC,OAAO,IAAA,oBAAa,EAAC,IAAA,mBAAQ,EAAC,EAAC,CAAC,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAFD,gCAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../src/decorators/common/description.ts"],"names":[],"mappings":";;;AAAA,qCAAgF;AAEhF,iDAA4C;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,SAAgB,WAAW,CAAC,WAAgB;IAC1C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,IAAyB,EAAE,EAAE;QACxE,QAAQ,IAAA,sBAAe,EAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,qBAAc,CAAC,IAAI,CAAC;YACzB,KAAK,qBAAc,CAAC,KAAK;gBACvB,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBACtC,MAAM;YAER,KAAK,qBAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBACjE,MAAM;YAER,KAAK,qBAAc,CAAC,MAAM;gBACvB,KAAyB,CAAC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;gBAC/D,MAAM;SACT;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,kCAiBC","sourcesContent":["import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\nimport type {JsonMethodStore} from \"../../domain/JsonMethodStore\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore\";\n\n/**\n * Add a description to the class, method or property\n *\n * ## Examples\n * ### On class\n *\n * ```typescript\n * @Description(\"description\")\n * class Model {\n *\n * }\n * ```\n *\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Description(\"description\")\n * async method() {}\n * }\n * ```\n *\n * ### On parameter\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * async method(@Description(\"description\") @PathParam(\"id\") id: string) {}\n * }\n * ```\n *\n * ### On property\n *\n * ```typescript\n * class Model {\n * @Description(\"description\")\n * id: string;\n * }\n * ```\n *\n * @param {string} description\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @methodDecorator\n * @propertyDecorator\n * @parameterDecorator\n */\nexport function Description(description: any) {\n return JsonEntityFn((store: JsonEntityStore, args: DecoratorParameters) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PROP:\n case DecoratorTypes.CLASS:\n store.schema.description(description);\n break;\n\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.description(description);\n break;\n\n case DecoratorTypes.METHOD:\n (store as JsonMethodStore).operation?.description(description);\n break;\n }\n });\n}\n"]}
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../src/decorators/common/description.ts"],"names":[],"mappings":";;;AAAA,qCAAgF;AAEhF,iDAA4C;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,SAAgB,WAAW,CAAC,WAAgB;IAC1C,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,IAAyB,EAAE,EAAE;QACxE,QAAQ,IAAA,sBAAe,EAAC,IAAI,CAAC,EAAE;YAC7B,KAAK,qBAAc,CAAC,IAAI,CAAC;YACzB,KAAK,qBAAc,CAAC,KAAK;gBACvB,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBACtC,MAAM;YAER,KAAK,qBAAc,CAAC,KAAK;gBACtB,KAA4B,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBACjE,MAAM;YAER,KAAK,qBAAc,CAAC,MAAM;gBACvB,KAAyB,CAAC,SAAS,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;gBAC/D,MAAM;SACT;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,kCAiBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"discriminatorKey.js","sourceRoot":"","sources":["../../../../src/decorators/common/discriminatorKey.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AAEzC,iDAA4C;AAC5C,yCAAoC;AAEpC,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,oBAAa,EAClB,IAAA,mBAAQ,GAAE,EACV,IAAA,2BAAY,EAAC,CAAC,KAAwB,EAAE,EAAE;QACxC,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC3B,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAPD,4CAOC","sourcesContent":["import {useDecorators} from \"@tsed/core\";\nimport {JsonPropertyStore} from \"../../domain/JsonPropertyStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\nimport {Property} from \"./property\";\n\nexport function DiscriminatorKey(): PropertyDecorator {\n return useDecorators(\n Property(),\n JsonEntityFn((store: JsonPropertyStore) => {\n store.discriminatorKey();\n })\n );\n}\n"]}
1
+ {"version":3,"file":"discriminatorKey.js","sourceRoot":"","sources":["../../../../src/decorators/common/discriminatorKey.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AAEzC,iDAA4C;AAC5C,yCAAoC;AAEpC,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,oBAAa,EAClB,IAAA,mBAAQ,GAAE,EACV,IAAA,2BAAY,EAAC,CAAC,KAAwB,EAAE,EAAE;QACxC,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC3B,CAAC,CAAC,CACH,CAAC;AACJ,CAAC;AAPD,4CAOC"}
@@ -1 +1 @@
1
- {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/decorators/common/enum.ts"],"names":[],"mappings":";;;AACA,2DAAsD;AACtD,iDAA4C;AAG5C,SAAS,MAAM,CAAC,SAAgC,EAAE,GAAG,UAA6B;IAChF,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,UAAU,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AAEU,QAAA,IAAI,GAAG,IAAA,2BAAY,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC","sourcesContent":["import type {JSONSchema6Type} from \"json-schema\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\nfunction EnumFn(...enumValues: (JSONSchema6Type | any)[]): Function;\nfunction EnumFn(enumValue: JSONSchema6Type | any, ...enumValues: JSONSchema6Type[]) {\n return JsonEntityFn((store) => {\n store.itemSchema.enum(enumValue, ...enumValues);\n });\n}\n\n/**\n * The enum keyword is used to restrict a value to a fixed set of values.\n * It must be an array with at least one element, where each element is unique.\n *\n * Elements in the array might be of any value, including null.\n *\n * ::: warning\n * For v6 user, use @@Enum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: \"value1\" | \"value2\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: (\"value1\" | \"value2\")[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * }\n * ```\n *\n * ### With Typescript Enum\n *\n * ```typescript\n * enum SomeEnum {\n * ENUM_1 = \"enum1\",\n * ENUM_2 = \"enum2\"\n * }\n *\n * class Model {\n * @Enum(SomeEnum)\n * property: SomeEnum;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"enum1\", \"enum2\"]\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} enumValue\n * @param enumValues\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\n\nexport const Enum = withErrorMsg(\"enum\", EnumFn);\n"]}
1
+ {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../../src/decorators/common/enum.ts"],"names":[],"mappings":";;;AACA,2DAAsD;AACtD,iDAA4C;AAG5C,SAAS,MAAM,CAAC,SAAgC,EAAE,GAAG,UAA6B;IAChF,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,UAAU,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AAEU,QAAA,IAAI,GAAG,IAAA,2BAAY,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"errorMsg.js","sourceRoot":"","sources":["../../../../src/decorators/common/errorMsg.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,GAA2B;IAClD,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,0GAA0G;QAC1G,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QACnE,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,cAAc,EAAE,EAAC,GAAG,YAAY,EAAE,GAAG,GAAG,EAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACL,CAAC;AAND,4BAMC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Create a new custom formats validator\n * @param name\n * @param options\n * @decorator\n * @ajv\n */\nexport function ErrorMsg(obj: Record<string, string>) {\n return JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n store.parentSchema.customKey(\"errorMessage\", {...errorMessage, ...obj});\n });\n}\n"]}
1
+ {"version":3,"file":"errorMsg.js","sourceRoot":"","sources":["../../../../src/decorators/common/errorMsg.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,GAA2B;IAClD,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,0GAA0G;QAC1G,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QACnE,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,cAAc,EAAE,EAAC,GAAG,YAAY,EAAE,GAAG,GAAG,EAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACL,CAAC;AAND,4BAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","sourceRoot":"","sources":["../../../../src/decorators/common/example.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;GASG;AACH,SAAgB,OAAO,CAAC,GAAG,QAAe;IACxC,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC","sourcesContent":["import {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Add an example metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Example(...examples: any[]): Function {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.examples(examples);\n });\n}\n"]}
1
+ {"version":3,"file":"example.js","sourceRoot":"","sources":["../../../../src/decorators/common/example.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;;;;;;;;GASG;AACH,SAAgB,OAAO,CAAC,GAAG,QAAe;IACxC,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAsB,EAAE,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"examples.js","sourceRoot":"","sources":["../../../../src/decorators/common/examples.ts"],"names":[],"mappings":";;;AAEA,iDAA4C;AAE5C;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAC,QAAgD;IACvE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAyB,EAAE,EAAE;QAChD,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,4BAIC","sourcesContent":["import {OpenSpecHash, OpenSpecRef, OS3Example} from \"@tsed/openspec\";\nimport {JsonParameterStore} from \"../../domain/JsonParameterStore\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Add a examples metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): ParameterDecorator {\n return JsonEntityFn((store: JsonParameterStore) => {\n store.parameter!.examples(examples);\n });\n}\n"]}
1
+ {"version":3,"file":"examples.js","sourceRoot":"","sources":["../../../../src/decorators/common/examples.ts"],"names":[],"mappings":";;;AAEA,iDAA4C;AAE5C;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAC,QAAgD;IACvE,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAyB,EAAE,EAAE;QAChD,KAAK,CAAC,SAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,4BAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"exclusiveMaximum.js","sourceRoot":"","sources":["../../../../src/decorators/common/exclusiveMaximum.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAY,EAAC,kBAAkB,EAAE,CAAC,OAAe,EAAE,mBAA4B,IAAI,EAAE,EAAE;IACrH,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {Maximum} from \"./maximum\";\n\n/**\n * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param maximum\n * @param {boolean} exclusiveMaximum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMaximum = withErrorMsg(\"exclusiveMaximum\", (maximum: number, exclusiveMaximum: boolean = true) => {\n return Maximum(maximum, exclusiveMaximum);\n});\n"]}
1
+ {"version":3,"file":"exclusiveMaximum.js","sourceRoot":"","sources":["../../../../src/decorators/common/exclusiveMaximum.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAY,EAAC,kBAAkB,EAAE,CAAC,OAAe,EAAE,mBAA4B,IAAI,EAAE,EAAE;IACrH,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"exclusiveMinimum.js","sourceRoot":"","sources":["../../../../src/decorators/common/exclusiveMinimum.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAY,EAAC,kBAAkB,EAAE,CAAC,OAAe,EAAE,mBAA4B,IAAI,EAAE,EAAE;IACrH,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {Minimum} from \"./minimum\";\n\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMinimum = withErrorMsg(\"exclusiveMinimum\", (minimum: number, exclusiveMinimum: boolean = true) => {\n return Minimum(minimum, exclusiveMinimum);\n});\n"]}
1
+ {"version":3,"file":"exclusiveMinimum.js","sourceRoot":"","sources":["../../../../src/decorators/common/exclusiveMinimum.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uCAAkC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,gBAAgB,GAAG,IAAA,2BAAY,EAAC,kBAAkB,EAAE,CAAC,OAAe,EAAE,mBAA4B,IAAI,EAAE,EAAE;IACrH,OAAO,IAAA,iBAAO,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../src/decorators/common/format.ts"],"names":[],"mappings":";;;AACA,kEAA6D;AAC7D,2DAAsD;AACtD,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACU,QAAA,MAAM,GAAG,IAAA,2BAAY,EAAC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;;;;;;;;;;;;;;;GA8DG;AACU,QAAA,GAAG,GAAG,IAAA,2BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,IAAA,cAAM,EAAC,iCAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACU,QAAA,GAAG,GAAG,IAAA,2BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAC7C,OAAO,IAAA,cAAM,EAAC,iCAAe,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC","sourcesContent":["import {ValueOf} from \"@tsed/core\";\nimport {JsonFormatTypes} from \"../../domain/JsonFormatTypes\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Format = withErrorMsg(\"format\", (format: JsonFormatTypes | ValueOf<JsonFormatTypes>) => {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n});\n\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n * @ajv-errors\n */\nexport const Email = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.EMAIL);\n});\n\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n * @ajv-errors\n */\nexport const DateTime = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE_TIME);\n});\n\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const DateFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE);\n});\n\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const TimeFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.TIME);\n});\n\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Uri = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URI);\n});\n\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * > See [Format](api/common/jsonschema/schema) decorator.\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Url = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URL);\n});\n"]}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../src/decorators/common/format.ts"],"names":[],"mappings":";;;AACA,kEAA6D;AAC7D,2DAAsD;AACtD,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACU,QAAA,MAAM,GAAG,IAAA,2BAAY,EAAC,QAAQ,EAAE,CAAC,MAAkD,EAAE,EAAE;IAClG,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACU,QAAA,KAAK,GAAG,IAAA,2BAAY,EAAC,QAAQ,EAAE,GAAG,EAAE;IAC/C,OAAO,IAAA,cAAM,EAAC,iCAAe,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACU,QAAA,QAAQ,GAAG,IAAA,2BAAY,EAAC,QAAQ,EAA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AG,IAAI;IACvC,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sCAIC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true): PropertyDecorator {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n"]}
1
+ {"version":3,"file":"forwardGroups.js","sourceRoot":"","sources":["../../../../src/decorators/common/forwardGroups.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,IAAI,GAAG,IAAI;IACvC,OAAO,IAAA,2BAAY,EAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sCAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/decorators/common/groups.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AAGnD,yDAAoD;AACpD,iDAA4C;AAE5C;;GAEG;AACH,SAAS,WAAW,CAAC,MAAW,EAAE,MAAsB;IACtD,MAAM,OAAO,GAAyB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC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import {DecoratorTypes, isArray} from \"@tsed/core\";\nimport type {JsonClassStore} from \"../../domain/JsonClassStore\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore\";\nimport {matchGroups} from \"../../utils/matchGroups\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * @ignore\n */\nfunction groupsClass(groups: any, entity: JsonClassStore) {\n const entries: [string, string[]][] = Object.entries(groups[0]);\n\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator: any = Groups(...groups);\n\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\n\n/**\n * Apply groups validation strategy\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Groups<T>(groupsDefinition: Record<string, (keyof T)[]>): ClassDecorator;\nexport function Groups<T>(groupName: string, groups: string[]): ParameterDecorator;\nexport function Groups(...groups: string[]): Function;\nexport function Groups(...groups: any): any {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity as JsonClassStore);\n break;\n case DecoratorTypes.PROP:\n entity.schema.$hooks.on(\"groups\", (prev: boolean, givenGroups: string[]) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n let groupsName = \"\";\n\n if (groups.length == 2 && isArray(groups[1])) {\n groupsName = groups[0];\n groups = groups[1];\n }\n\n (entity as JsonParameterStore).parameter.groups = groups;\n (entity as JsonParameterStore).parameter.groupsName = groupsName;\n break;\n }\n });\n}\n"]}
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/decorators/common/groups.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AAGnD,yDAAoD;AACpD,iDAA4C;AAE5C;;GAEG;AACH,SAAS,WAAW,CAAC,MAAW,EAAE,MAAsB;IACtD,MAAM,OAAO,GAAyB,MAAM,CAAC,OAAO,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EAAE;oBAC5C,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;oBACvB,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;iBACpB;gBAEA,MAA6B,CAAC,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;gBACxD,MAA6B,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;gBACjE,MAAM;SACT;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA9BD,wBA8BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../../../src/decorators/common/hidden.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,eAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,wBAEC","sourcesContent":["import {StoreSet} from \"@tsed/core\";\n\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n"]}
1
+ {"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../../../src/decorators/common/hidden.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,eAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,wBAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../../src/decorators/common/ignore.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;GAEG;AACH,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,SAAgB,MAAM,CAAC,KAA+B,SAAS;IAC7D,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,wBAIC","sourcesContent":["import {IgnoreCallback} from \"../../interfaces/IgnoreCallback\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * @ignore\n */\nconst defaultCB = (value: any, ctx: any) => ctx.mongoose !== true;\n\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.mongoose) // don't ignore prop only if mongoose\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Post, Controller, BodyParams} from \"@tsed/common\";\n * import {Person} from \"../models/Person\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Ignore(cb: boolean | IgnoreCallback = defaultCB) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n"]}
1
+ {"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../../src/decorators/common/ignore.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE5C;;GAEG;AACH,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,GAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,SAAgB,MAAM,CAAC,KAA+B,SAAS;IAC7D,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,wBAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../../src/decorators/common/integer.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC","sourcesContent":["import {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/common.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n"]}
1
+ {"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../../src/decorators/common/integer.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,0BAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsonEntityFn.js","sourceRoot":"","sources":["../../../../src/decorators/common/jsonEntityFn.ts"],"names":[],"mappings":";;;AAEA,uEAAkE;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,YAAY,CAC1B,EAAuD;IAEvD,OAAO,CAAC,GAAG,UAA+B,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAQ,EAAE,CAAC,IAAA,uCAAkB,EAAI,GAAG,UAAU,CAAM,EAAE,UAAU,CAAC,CAAC;QAC9E,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC;SACvB;IACH,CAAC,CAAC;AACJ,CAAC;AATD,oCASC","sourcesContent":["import {DecoratorParameters} from \"@tsed/core\";\nimport type {JsonEntityStore} from \"../../domain/JsonEntityStore\";\nimport {getJsonEntityStore} from \"../../utils/getJsonEntityStore\";\n\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn<T extends JsonEntityStore = JsonEntityStore>(\n fn: (entity: T, parameters: DecoratorParameters) => any\n): (...args: any[]) => any {\n return (...parameters: DecoratorParameters) => {\n const result: any = fn(getJsonEntityStore<T>(...parameters) as T, parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"jsonEntityFn.js","sourceRoot":"","sources":["../../../../src/decorators/common/jsonEntityFn.ts"],"names":[],"mappings":";;;AAEA,uEAAkE;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,YAAY,CAC1B,EAAuD;IAEvD,OAAO,CAAC,GAAG,UAA+B,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAQ,EAAE,CAAC,IAAA,uCAAkB,EAAI,GAAG,UAAU,CAAM,EAAE,UAAU,CAAC,CAAC;QAC9E,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC;SACvB;IACH,CAAC,CAAC;AACJ,CAAC;AATD,oCASC"}
@@ -1 +1 @@
1
- {"version":3,"file":"maxLength.js","sourceRoot":"","sources":["../../../../src/decorators/common/maxLength.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACU,QAAA,SAAS,GAAG,IAAA,2BAAY,EAAC,WAAW,EAAE,CAAC,SAAiB,EAAE,EAAE;IACvE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength 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 @@MaxLength@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MaxLength = withErrorMsg(\"maxLength\", (maxLength: number) => {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n});\n"]}
1
+ {"version":3,"file":"maxLength.js","sourceRoot":"","sources":["../../../../src/decorators/common/maxLength.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACU,QAAA,SAAS,GAAG,IAAA,2BAAY,EAAC,WAAW,EAAE,CAAC,SAAiB,EAAE,EAAE;IACvE,IAAI,SAAS,GAAG,CAAC,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"maximum.js","sourceRoot":"","sources":["../../../../src/decorators/common/maximum.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,OAAO,GAAG,IAAA,2BAAY,EAAC,SAAS,EAAE,CAAC,OAAe,EAAE,YAAqB,KAAK,EAAE,EAAE;IAC7F,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACU,QAAA,GAAG,GAAG,eAAO,CAAC","sourcesContent":["import {withErrorMsg} from \"../../utils/withErrorMsg\";\nimport {JsonEntityFn} from \"./jsonEntityFn\";\n\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Maximum = withErrorMsg(\"maximum\", (maximum: number, exclusive: boolean = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n});\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Max = Maximum;\n"]}
1
+ {"version":3,"file":"maximum.js","sourceRoot":"","sources":["../../../../src/decorators/common/maximum.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,iDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACU,QAAA,OAAO,GAAG,IAAA,2BAAY,EAAC,SAAS,EAAE,CAAC,OAAe,EAAE,YAAqB,KAAK,EAAE,EAAE;IAC7F,OAAO,IAAA,2BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACU,QAAA,GAAG,GAAG,eAAO,CAAC"}