@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":"JsonSchema.js","sourceRoot":"","sources":["../../../src/domain/JsonSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,MAAM,EAEN,IAAI,EAEL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,UAAU,EAAC,MAAM,yCAAyC,CAAC;AAEnE,OAAO,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,mBAAmB,EAAC,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAEjD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CAAC,CAAC,CAAC;SACpC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAU;QACzB,IAAI,GAAG,IAAI,IAAI,EAAE;YACf,UAAU,CAAE,IAAY,CAAC,GAAG,CAAC,CAAC,IAAK,IAAY,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;SAC7D;aAAM;YACL,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SACvB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,eAAe;QACb,OAAO,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACpG,CAAC;IAED,KAAK;QACH,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["import {\n ancestorsOf,\n classOf,\n Hooks,\n isArray,\n isClass,\n isFunction,\n isObject,\n isPrimitiveClass,\n nameOf,\n Type,\n uniq,\n ValueOf\n} from \"@tsed/core\";\nimport type {JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version} from \"json-schema\";\nimport {IgnoreCallback} from \"../interfaces/IgnoreCallback\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {enumsRegistry} from \"../registries/enumRegistries\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {NestedGenerics} from \"../utils/generics\";\nimport {getComputedType} from \"../utils/getComputedType\";\nimport {getJsonType} from \"../utils/getJsonType\";\nimport {serializeEnumValues} from \"../utils/serializeEnumValues\";\nimport {toJsonRegex} from \"../utils/toJsonRegex\";\nimport {AliasMap, AliasType} from \"./JsonAliasMap\";\nimport {Discriminator} from \"./JsonDiscriminator\";\nimport {JsonEntityStore} from \"./JsonEntityStore\";\nimport {JsonFormatTypes} from \"./JsonFormatTypes\";\nimport {JsonLazyRef} from \"./JsonLazyRef\";\n\nexport interface JsonSchemaObject extends JSONSchema6, Record<string, any> {\n type: (any | JSONSchema6TypeName) | (any | JSONSchema6TypeName)[];\n additionalProperties?: boolean | JSONSchema6 | any;\n propertyNames?: boolean | JSONSchema6 | any;\n items?: (any | JSONSchema6Definition) | (any | JSONSchema6Definition)[];\n}\n\nexport type AnyJsonSchema = Partial<JsonSchemaObject> | JsonSchema | JsonLazyRef | any;\n\nfunction mapProperties(properties: Record<string, any>) {\n // istanbul ignore next\n if (properties instanceof JsonSchema) {\n return properties;\n }\n\n return Object.entries(properties).reduce<any>((properties, [key, schema]) => {\n properties[toJsonRegex(key)] = mapToJsonSchema(schema);\n\n return properties;\n }, {});\n}\n\nfunction mapToJsonSchema(item: any): any {\n if (isArray(item)) {\n return (item as any[]).map(mapToJsonSchema);\n }\n\n if (item.isStore || item.isJsonSchema || item.isLazyRef) {\n return item;\n }\n\n if (classOf(item) !== Object && isClass(item)) {\n return JsonEntityStore.from(item).schema;\n }\n\n if (isObject(item)) {\n return JsonSchema.from(item as any);\n }\n\n if (isPrimitiveClass(item)) {\n return JsonSchema.from({type: item});\n }\n\n return item;\n}\n\nexport class JsonSchema extends Map<string, any> implements NestedGenerics {\n readonly isJsonSchema = true;\n readonly $hooks = new Hooks();\n readonly $required: Set<string> = new Set();\n readonly $allow: any[] = [];\n public $selfRequired: boolean;\n public $forwardGroups: boolean = false;\n\n public isDiscriminatorKey = false;\n public isDiscriminator = false;\n\n #nullable: boolean = false;\n #discriminator: null | Discriminator = null;\n #genericLabels: string[];\n #nestedGenerics: Type<any>[][] = [];\n #alias: AliasMap = new Map();\n #itemSchema: JsonSchema;\n #target: Type<any>;\n #isGeneric: boolean = false;\n #isCollection: boolean = false;\n #ref: boolean = false;\n\n constructor(obj: JsonSchema | Partial<JsonSchemaObject> = {}) {\n super();\n\n if (obj) {\n this.assign(obj);\n }\n }\n\n get alias() {\n return this.#alias;\n }\n\n get nestedGenerics(): any[] {\n return this.#nestedGenerics;\n }\n\n set nestedGenerics(value: any[]) {\n this.#nestedGenerics = value;\n }\n\n get genericLabels(): string[] {\n return this.#genericLabels;\n }\n\n set genericLabels(value: string[]) {\n this.#genericLabels = value;\n }\n\n get isClass() {\n return isClass(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target as any);\n }\n\n /**\n * Current schema is a collection\n */\n get isCollection() {\n return this.#isCollection;\n }\n\n /**\n * Current schema is a generic\n */\n get isGeneric() {\n return this.#isGeneric;\n }\n\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.#target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor).schema;\n }\n\n /**\n * Current schema has generics items\n */\n get hasGenerics(): boolean {\n return !!(this.nestedGenerics && this.nestedGenerics.length);\n }\n\n get genericType(): string {\n return this.get(\"$ref\");\n }\n\n get class() {\n return this.getComputedType();\n }\n\n get canRef(): boolean {\n return this.#ref;\n }\n\n get isNullable(): boolean {\n return this.#nullable || this.$allow.includes(null);\n }\n\n get isReadOnly() {\n return this.get(\"readOnly\");\n }\n\n get isWriteOnly() {\n return this.get(\"writeOnly\");\n }\n\n get hasDiscriminator() {\n return !!this.#discriminator;\n }\n\n static from(obj: Partial<JsonSchemaObject> = {}) {\n return new JsonSchema(obj);\n }\n\n nullable(value: boolean) {\n this.#nullable = value;\n }\n\n itemSchema(obj: AnyJsonSchema = {}) {\n this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);\n this.#itemSchema.assign(obj);\n\n return this.#itemSchema;\n }\n\n getAliasOf(property: AliasType) {\n return this.#alias.get(property as any);\n }\n\n addAlias(property: AliasType, alias: AliasType) {\n this.#alias.set(property, alias);\n this.#alias.set(alias, property);\n\n return this;\n }\n\n removeAlias(property: AliasType) {\n const alias = this.#alias.get(property);\n alias && this.#alias.delete(alias);\n this.#alias.delete(property);\n\n return this;\n }\n\n $id($id: string) {\n super.set(\"$id\", $id);\n\n return this;\n }\n\n $ref($ref: string) {\n super.set(\"$ref\", $ref);\n\n return this;\n }\n\n $schema($schema: JSONSchema6Version) {\n super.set(\"$schema\", $schema);\n\n return this;\n }\n\n /**\n * Create a ref and use name to sharing schema\n * @param name\n */\n label(name: string) {\n this.#ref = true;\n\n super.set(\"name\", name);\n\n return this;\n }\n\n name(name: string) {\n super.set(\"name\", name);\n\n return this;\n }\n\n ignore(cb: boolean | IgnoreCallback) {\n if (typeof cb === \"boolean\") {\n const bool = cb;\n cb = () => bool;\n }\n\n this.$hooks.on(\"ignore\", cb);\n\n return this;\n }\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 * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3\n */\n default(value: JSONSchema6Type) {\n super.set(\"default\", value);\n\n return this;\n }\n\n /**\n * More readible form of a one-element \"enum\"\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24\n */\n const(value: JSONSchema6Type) {\n super.set(\"const\", value);\n\n return this;\n }\n\n /**\n * This attribute is a string that provides a full description of the of purpose the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n description(description: string) {\n super.set(\"description\", description);\n\n return this;\n }\n\n discriminator() {\n this.isDiscriminator = true;\n return (this.#discriminator =\n this.#discriminator ||\n new Discriminator({\n base: this.#target\n }));\n }\n\n discriminatorKey(propertyName: string) {\n this.discriminator().propertyName = propertyName;\n this.isDiscriminator = true;\n\n return this;\n }\n\n discriminatorValue(...values: string[]) {\n const discriminator = this.discriminatorAncestor.discriminator();\n discriminator.add(this.#target, values);\n\n this.isDiscriminator = true;\n\n const properties = this.get(\"properties\");\n const schema: JsonSchema =\n properties[discriminator.propertyName] ||\n new JsonSchema({\n type: \"string\"\n });\n\n if (values.length === 1) {\n schema.const(values[0]);\n schema.examples([values[0]]);\n } else {\n schema.enum(...values);\n schema.examples(values);\n }\n\n properties[discriminator.propertyName] = schema;\n\n this.set(\"properties\", properties);\n\n return this;\n }\n\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * If \"items\" is an array of schemas, validation succeeds if every instance element\n * at a position greater than the size of \"items\" validates against \"additionalItems\".\n * Otherwise, \"additionalItems\" MUST be ignored, as the \"items\" schema\n * (possibly the default value of an empty schema) is applied to all elements.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10\n */\n additionalItems(additionalItems: boolean | AnyJsonSchema) {\n super.set(\"additionalItems\", mapToJsonSchema(additionalItems));\n\n return this;\n }\n\n /**\n * An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14\n */\n contains(contains: JSONSchema6Definition) {\n super.set(\"contains\", mapToJsonSchema(contains));\n\n return this;\n }\n\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n examples(examples: JSONSchema6Type[]) {\n super.set(\"examples\", examples);\n\n return this;\n }\n\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n example(...examples: JSONSchema6Type[]) {\n return this.examples(examples);\n }\n\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9\n */\n items(items: AnyJsonSchema | AnyJsonSchema[]) {\n super.set(\"items\", (this.#itemSchema = mapToJsonSchema(items)));\n\n return this;\n }\n\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11\n */\n maxItems(maxItems: number) {\n super.set(\"maxItems\", maxItems);\n\n return this;\n }\n\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12\n */\n minItems(minItems: number) {\n super.set(\"minItems\", minItems);\n\n return this;\n }\n\n /**\n * If this keyword has boolean value false, the instance validates successfully.\n * If it has boolean value true, the instance validates successfully if all of its elements are unique.\n * Omitting this keyword has the same behavior as a value of false.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13\n */\n uniqueItems(uniqueItems: boolean) {\n super.set(\"uniqueItems\", uniqueItems);\n\n return this;\n }\n\n /**\n * Must be a non-negative integer.\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 * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15\n */\n maxProperties(maxProperties: number) {\n super.set(\"maxProperties\", maxProperties);\n\n return this;\n }\n\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is greater than,\n * or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16\n */\n minProperties(minProperties: number) {\n super.set(\"minProperties\", minProperties);\n\n return this;\n }\n\n allow(...allow: any[]) {\n this.$allow.push(...allow);\n return this;\n }\n\n /**\n * Elements of this array must be unique.\n * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.\n * Omitting this keyword has the same behavior as an empty array.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17\n */\n required(required: boolean | string[] = true) {\n if (isArray(required)) {\n this.$required.clear();\n\n required.forEach((value: any) => this.$required.add(value));\n } else {\n const schema = this.clone();\n schema.$selfRequired = required;\n return schema;\n }\n\n return this;\n }\n\n addRequired(property: string) {\n this.$required.add(property);\n\n return this;\n }\n\n removeRequired(property: string) {\n this.$required.delete(property);\n\n return this;\n }\n\n isRequired(property: string): boolean {\n return this.$required.has(property);\n }\n\n /**\n * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.\n * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,\n * the child instance for that name successfully validates against the corresponding schema.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18\n */\n properties(properties: AnyJsonSchema | Record<string, AnyJsonSchema>) {\n super.set(\"properties\", mapProperties(properties));\n\n return this;\n }\n\n addProperty(key: string, schema: AnyJsonSchema) {\n const properties = this.get(\"properties\") || {};\n\n properties[key] = schema;\n\n super.set(\"properties\", mapProperties(properties));\n\n return this;\n }\n\n /**\n * This attribute is an object that defines the schema for a set of property names of an object instance.\n * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.\n * If the pattern matches the name of a property on the instance object, the value of the instance's property\n * MUST be valid against the pattern name's schema value.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19\n */\n patternProperties(patternProperties: Record<string, AnyJsonSchema>) {\n super.set(\"patternProperties\", mapProperties(patternProperties));\n\n return this;\n }\n\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n */\n additionalProperties(additionalProperties: boolean | AnyJsonSchema) {\n super.set(\"additionalProperties\", mapToJsonSchema(additionalProperties));\n\n return this;\n }\n\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n * @alias additionalProperties\n * @param unknown\n */\n unknown(unknown: boolean = true) {\n return this.additionalProperties(unknown);\n }\n\n /**\n * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.\n * Each property specifies a dependency.\n * If the dependency value is an array, each element in the array must be unique.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21\n */\n dependencies(dependencies: {[p: string]: JSONSchema6Definition | JsonSchema | string[]}) {\n super.set(\"dependencies\", mapProperties(dependencies));\n\n return this;\n }\n\n /**\n * Takes a schema which validates the names of all properties rather than their values.\n * Note the property name that the schema is testing will always be a string.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22\n */\n propertyNames(propertyNames: JSONSchema6Definition | JsonSchema) {\n super.set(\"propertyNames\", mapToJsonSchema(propertyNames));\n\n return this;\n }\n\n /**\n * This provides an enumeration of all possible values that are valid\n * for the instance property. This MUST be an array, and each item in\n * the array represents a possible value for the instance value. If\n * this attribute is defined, the instance value MUST be one of the\n * values in the array in order for the schema to be valid.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23\n */\n enum(...enumValues: any[]): this;\n enum(enumSchema: JsonSchema): this;\n enum(enumValue: any | any[] | JsonSchema, ...enumValues: any[]): this {\n if (enumsRegistry.has(enumValue)) {\n return this.enum(enumsRegistry.get(enumValue));\n }\n\n if (enumValue instanceof JsonSchema) {\n if (enumValue.getName()) {\n super.set(\"enum\", enumValue);\n } else {\n super.set(\"enum\", enumValue.get(\"enum\")).any(...enumValue.getJsonType());\n }\n } else {\n const {values, types} = serializeEnumValues([enumValue, enumValues].flat());\n\n super.set(\"enum\", values).any(...types);\n }\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions(definitions: Record<string, AnyJsonSchema>) {\n super.set(\"definitions\", mapProperties(definitions));\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf(allOf: AnyJsonSchema[]) {\n super.set(\"allOf\", allOf.map(mapToJsonSchema));\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf(anyOf: AnyJsonSchema[]) {\n super.set(\"anyOf\", anyOf.map(mapToJsonSchema));\n\n return this;\n }\n\n /*\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf(oneOf: AnyJsonSchema[]) {\n let resolvedOneOf = oneOf.map(mapToJsonSchema);\n\n if (resolvedOneOf.length === 1 && !(oneOf[0] instanceof JsonSchema)) {\n if (!resolvedOneOf[0].hasDiscriminator) {\n return this.type(oneOf[0]);\n }\n\n const children = resolvedOneOf[0].discriminator().children();\n\n if (!children.length) {\n return this.type(oneOf[0]);\n }\n\n resolvedOneOf = children.map(mapToJsonSchema);\n }\n\n super.set(\"oneOf\", resolvedOneOf);\n\n const jsonSchema: JsonSchema = resolvedOneOf[0];\n\n if (jsonSchema.isDiscriminator) {\n const discriminator = jsonSchema.discriminatorAncestor.discriminator();\n const {propertyName} = discriminator;\n super.set(\"discriminator\", {propertyName});\n this.isDiscriminator = true;\n this.#discriminator = discriminator;\n }\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not(not: AnyJsonSchema) {\n super.set(\"not\", mapToJsonSchema(not));\n\n return this;\n }\n\n /**\n * Must be strictly greater than 0.\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1\n */\n multipleOf(multipleOf: number): this {\n super.set(\"multipleOf\", multipleOf);\n\n return this;\n }\n\n /**\n * Representing an inclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is less than or exactly equal to \"maximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2\n */\n maximum(maximum: number): this {\n super.set(\"maximum\", maximum);\n\n return this;\n }\n\n /**\n * Representing an exclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is strictly less than (not equal to) to \"exclusiveMaximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3\n */\n exclusiveMaximum(exclusiveMaximum: number): this {\n super.set(\"exclusiveMaximum\", exclusiveMaximum);\n\n return this;\n }\n\n /**\n * Representing an inclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is greater than or exactly equal to \"minimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4\n */\n minimum(minimum: number): this {\n super.set(\"minimum\", minimum);\n\n return this;\n }\n\n /**\n * Representing an exclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is strictly greater than (not equal to) to \"exclusiveMinimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5\n */\n exclusiveMinimum(exclusiveMinimum: number): this {\n super.set(\"exclusiveMinimum\", exclusiveMinimum);\n\n return this;\n }\n\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6\n */\n maxLength(maxLength: number): this {\n super.set(\"maxLength\", maxLength);\n\n return this;\n }\n\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7\n */\n minLength(minLength: number): this {\n super.set(\"minLength\", minLength);\n\n return this;\n }\n\n /**\n * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8\n */\n pattern(pattern: string | RegExp): this {\n super.set(\"pattern\", toJsonRegex(pattern));\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format(format: JsonFormatTypes | ValueOf<JsonFormatTypes>): this {\n super.set(\"format\", format);\n\n return this;\n }\n\n /**\n * A single type, or a union of simple types\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25\n */\n type(type: any | JSONSchema6TypeName | JSONSchema6TypeName[]): this {\n switch (type) {\n case Map:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"additionalProperties\")) {\n super.set(\"additionalProperties\", this.itemSchema({}));\n }\n break;\n\n case Array:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n\n case Set:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n this.uniqueItems(true);\n\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n\n case \"integer\":\n super.set(\"type\", getJsonType(type));\n this.integer();\n break;\n\n case Object:\n case Date:\n case Boolean:\n case Number:\n case String:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n break;\n\n default:\n if (isClass(type) || isFunction(type)) {\n super.set(\"type\", undefined);\n this.#target = type;\n\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n } else {\n const jsonType = getJsonType(type);\n if (jsonType === \"generic\") {\n this.#isGeneric = true;\n super.set(\"$ref\", type);\n } else {\n super.set(\"type\", jsonType);\n }\n }\n }\n\n return this;\n }\n\n any(...types: any[]) {\n const hasClasses = types.filter((type) => isClass(type));\n\n if (hasClasses.length >= 2) {\n this.oneOf(\n types.filter((value) => {\n if (value !== null) {\n this.nullable(true);\n return true;\n }\n return false;\n })\n );\n } else {\n if (types.length) {\n types = uniq(types).map(getJsonType);\n\n if (types.includes(\"null\")) {\n this.nullable(true);\n types = types.filter((o) => o !== \"null\");\n }\n } else {\n types = [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\"];\n this.nullable(true);\n }\n\n this.type(types.length === 1 ? types[0] : types);\n }\n\n return this;\n }\n\n integer() {\n super.set(\"type\", \"integer\");\n super.set(\"multipleOf\", 1.0);\n\n return this;\n }\n\n /**\n * This attribute is a string that provides a short description of the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n title(title: string): this {\n super.set(\"title\", title);\n\n return this;\n }\n\n readOnly(readOnly: boolean): this {\n super.set(\"readOnly\", readOnly);\n\n return this;\n }\n\n writeOnly(readOnly: boolean): this {\n super.set(\"writeOnly\", readOnly);\n\n return this;\n }\n\n customKey(key: string, value: any) {\n super.set(`#${key}`, value);\n\n return this;\n }\n\n toObject(options?: JsonSchemaOptions) {\n return this.toJSON(options);\n }\n\n toJSON(options?: JsonSchemaOptions) {\n let addDef = false;\n\n if (!options) {\n addDef = true;\n options = {schemas: {}};\n }\n\n const schema = execMapper(\"schema\", this, options);\n\n if (addDef && options.schemas && Object.keys(options.schemas).length) {\n schema.definitions = options.schemas;\n }\n\n return schema;\n }\n\n assign(obj: JsonSchema | Partial<JsonSchemaObject> = {}) {\n const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);\n entries.forEach(([key, value]) => {\n this.set(key, value);\n });\n\n if (obj instanceof JsonSchema) {\n this.$selfRequired = obj.$selfRequired;\n this.$allow.push(...obj.$allow);\n\n obj.$required.forEach((key) => {\n this.$required.add(key);\n });\n\n this.#discriminator = this.#discriminator ? new Discriminator(this.#discriminator) : null;\n this.isDiscriminator = obj.isDiscriminator;\n this.isDiscriminatorKey = obj.isDiscriminatorKey;\n\n this.#ref = obj.#ref;\n this.#alias = new Map(this.#alias.entries());\n obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);\n this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);\n this.#target = obj.#target;\n this.#isGeneric = obj.#isGeneric;\n this.#isCollection = obj.#isCollection;\n this.#ref = obj.#ref;\n\n super.set(\"type\", obj.get(\"type\"));\n }\n\n return this;\n }\n\n set(key: string, value: any): this {\n if (key in this) {\n isFunction((this as any)[key]) && (this as any)[key](value);\n } else {\n super.set(key, value);\n }\n\n return this;\n }\n\n /**\n * Return the itemSchema computed type.\n * If the type is a function used for recursive model,\n * the function will be called to get the right type.\n */\n getComputedType(): any {\n return getComputedType(this.#target);\n }\n\n getComputedItemType(): any {\n return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();\n }\n\n /**\n * Return the Json type as string\n */\n getJsonType(): string | string[] {\n return this.get(\"type\") || getJsonType(this.getComputedType());\n }\n\n getTarget() {\n return this.#target;\n }\n\n /**\n * Get the symbolic name of the entity\n */\n getName() {\n return this.get(\"name\") || (isClass(this.#target) ? nameOf(classOf(this.getComputedType())) : \"\");\n }\n\n clone() {\n return new JsonSchema(this);\n }\n}\n"]}
1
+ {"version":3,"file":"JsonSchema.js","sourceRoot":"","sources":["../../../src/domain/JsonSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ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,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACpG,CAAC;IAED,KAAK;QACH,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpecTypes.js","sourceRoot":"","sources":["../../../src/domain/SpecTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,iCAAoB,CAAA;IACpB,iCAAoB,CAAA;AACtB,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB","sourcesContent":["export enum SpecTypes {\n JSON = \"jsonschema\",\n SWAGGER = \"swagger2\",\n OPENAPI = \"openapi3\"\n}\n"]}
1
+ {"version":3,"file":"SpecTypes.js","sourceRoot":"","sources":["../../../src/domain/SpecTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,iCAAoB,CAAA;IACpB,iCAAoB,CAAA;AACtB,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"alterIgnore.js","sourceRoot":"","sources":["../../../src/hooks/alterIgnore.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAuB,EAAE,OAAY;IAC/D,IAAI,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAE/D,IAAI,MAAM,EAAE;QACV,OAAO,MAAM,CAAC;KACf;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;QAC5B,OAAO,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;KACjE;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {Hooks} from \"@tsed/core\";\n\n/**\n * @ignore\n * @param schema\n * @param options\n */\nexport function alterIgnore(schema: {$hooks: Hooks}, options: any) {\n let result = schema?.$hooks?.alter(\"ignore\", false, [options]);\n\n if (result) {\n return result;\n }\n\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"groups\", false, [options.groups]);\n }\n\n return result;\n}\n"]}
1
+ {"version":3,"file":"alterIgnore.js","sourceRoot":"","sources":["../../../src/hooks/alterIgnore.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAuB,EAAE,OAAY;IAC/D,IAAI,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAE/D,IAAI,MAAM,EAAE;QACV,OAAO,MAAM,CAAC;KACf;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;QAC5B,OAAO,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;KACjE;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"alterOneOf.js","sourceRoot":"","sources":["../../../src/hooks/alterOneOf.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,UAAU,CAAC,GAAQ,EAAE,MAAkB,EAAE,OAA0B;IACjF,IAAI,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;QACzC,GAAG,GAAG,EAAC,GAAG,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC;KAClF;IAED,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE;QAC3E,OAAO,GAAG,CAAC,IAAI,CAAC;KACjB;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import type {JsonSchema} from \"../domain/JsonSchema\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nexport function alterOneOf(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n if (obj.oneOf && options.groups !== false) {\n obj = {...obj, oneOf: schema.$hooks.alter(\"oneOf\", obj.oneOf, [options.groups])};\n }\n\n if ((obj.oneOf || obj.allOf || obj.anyOf) && !(obj.items || obj.properties)) {\n delete obj.type;\n }\n\n return obj;\n}\n"]}
1
+ {"version":3,"file":"alterOneOf.js","sourceRoot":"","sources":["../../../src/hooks/alterOneOf.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,UAAU,CAAC,GAAQ,EAAE,MAAkB,EAAE,OAA0B;IACjF,IAAI,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;QACzC,GAAG,GAAG,EAAC,GAAG,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC;KAClF;IAED,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE;QAC3E,OAAO,GAAG,CAAC,IAAI,CAAC;KACjB;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"alterRequiredGroups.js","sourceRoot":"","sources":["../../../src/hooks/alterRequiredGroups.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAkB,EAAE,MAAkB,EAAE,OAA0B;IACpG,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;QAC5B,OAAO,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;KAC5E;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import type {JsonSchema} from \"../domain/JsonSchema\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n/**\n * @ignore\n */\nexport function alterRequiredGroups(required: string[], schema: JsonSchema, options: JsonSchemaOptions): string[] {\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"requiredGroups\", required, [options.groups]);\n }\n\n return required;\n}\n"]}
1
+ {"version":3,"file":"alterRequiredGroups.js","sourceRoot":"","sources":["../../../src/hooks/alterRequiredGroups.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAkB,EAAE,MAAkB,EAAE,OAA0B;IACpG,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE;QAC5B,OAAO,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;KAC5E;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/lib/esm/index.js CHANGED
@@ -138,6 +138,7 @@ export * from "./utils/getPropertiesStores.js";
138
138
  export * from "./utils/getRequiredProperties.js";
139
139
  export * from "./utils/getSpec.js";
140
140
  export * from "./utils/getSpecType.js";
141
+ export * from "./utils/inlineEnums.js";
141
142
  export * from "./utils/isSuccessStatus.js";
142
143
  export * from "./utils/mapHeaders.js";
143
144
  export * from "./utils/mapNullableType.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,c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cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./components/anyMapper\";\nexport * from \"./components/classMapper\";\nexport * from \"./components/genericsMapper\";\nexport * from \"./components/inheritedClassMapper\";\nexport * from \"./components/itemMapper\";\nexport * from \"./components/lazyRefMapper\";\nexport * from \"./components/mapMapper\";\nexport * from \"./components/objectMapper\";\nexport * from \"./components/ofMapper\";\nexport * from \"./components/propertiesMapper\";\nexport * from \"./components/schemaMapper\";\nexport * from \"./constants/httpMethods\";\nexport * from \"./constants/httpStatusMessages\";\nexport * from \"./decorators/class/children\";\nexport * from \"./decorators/class/discriminatorValue\";\nexport * from \"./decorators/collections/collectionContains\";\nexport * from \"./decorators/collections/collectionOf\";\nexport * from \"./decorators/collections/maxItems\";\nexport * from \"./decorators/collections/maxProperties\";\nexport * from \"./decorators/collections/minItems\";\nexport * from \"./decorators/collections/minProperties\";\nexport * from \"./decorators/collections/uniqueItems\";\nexport * from \"./decorators/common/additionalProperties\";\nexport * from \"./decorators/common/allOf\";\nexport * from \"./decorators/common/allow\";\nexport * from \"./decorators/common/any\";\nexport * from \"./decorators/common/anyOf\";\nexport * from \"./decorators/common/const\";\nexport * from \"./decorators/common/customKey\";\nexport * from \"./decorators/common/default\";\nexport * from \"./decorators/common/defaultMsg\";\nexport * from \"./decorators/common/description\";\nexport * from \"./decorators/common/discriminatorKey\";\nexport * from \"./decorators/common/enum\";\nexport * from \"./decorators/common/errorMsg\";\nexport * from \"./decorators/common/example\";\nexport * from \"./decorators/common/examples\";\nexport * from \"./decorators/common/exclusiveMaximum\";\nexport * from \"./decorators/common/exclusiveMinimum\";\nexport * from \"./decorators/common/format\";\nexport * from \"./decorators/common/forwardGroups\";\nexport * from \"./decorators/common/groups\";\nexport * from \"./decorators/common/hidden\";\nexport * from \"./decorators/common/ignore\";\nexport * from \"./decorators/common/integer\";\nexport * from \"./decorators/common/jsonEntityFn\";\nexport * from \"./decorators/common/maxLength\";\nexport * from \"./decorators/common/maximum\";\nexport * from \"./decorators/common/minLength\";\nexport * from \"./decorators/common/minimum\";\nexport * from \"./decorators/common/multipleOf\";\nexport * from \"./decorators/common/name\";\nexport * from \"./decorators/common/nullable\";\nexport * from \"./decorators/common/oneOf\";\nexport * from \"./decorators/common/optional\";\nexport * from \"./decorators/common/pattern\";\nexport * from \"./decorators/common/property\";\nexport * from \"./decorators/common/readOnly\";\nexport * from \"./decorators/common/recordOf\";\nexport * from \"./decorators/common/required\";\nexport * from \"./decorators/common/requiredGroups\";\nexport * from \"./decorators/common/schema\";\nexport * from \"./decorators/common/title\";\nexport * from \"./decorators/common/typeError\";\nexport * from \"./decorators/common/writeOnly\";\nexport * from \"./decorators/config/jsonEntityComponent\";\nexport * from \"./decorators/generics/genericOf\";\nexport * from \"./decorators/generics/generics\";\nexport * from \"./decorators/operations/acceptMime\";\nexport * from \"./decorators/operations/consumes\";\nexport * from \"./decorators/operations/contentType\";\nexport * from \"./decorators/operations/deprecated\";\nexport * from \"./decorators/operations/header\";\nexport * from \"./decorators/operations/in\";\nexport * from \"./decorators/operations/inFile\";\nexport * from \"./decorators/operations/location\";\nexport * from \"./decorators/operations/operationId\";\nexport * from \"./decorators/operations/operationPath\";\nexport * from \"./decorators/operations/partial\";\nexport * from \"./decorators/operations/path\";\nexport * from \"./decorators/operations/produces\";\nexport * from \"./decorators/operations/redirect\";\nexport * from \"./decorators/operations/returns\";\nexport * from \"./decorators/operations/route\";\nexport * from \"./decorators/operations/security\";\nexport * from \"./decorators/operations/status\";\nexport * from \"./decorators/operations/summary\";\nexport * from \"./decorators/operations/tags\";\nexport * from \"./decorators/operations/view\";\nexport * from \"./domain/DecoratorContext\";\nexport * from \"./domain/JsonAliasMap\";\nexport * from \"./domain/JsonClassStore\";\nexport * from \"./domain/JsonDiscriminator\";\nexport * from \"./domain/JsonEntityStore\";\nexport * from \"./domain/JsonFormatTypes\";\nexport * from \"./domain/JsonLazyRef\";\nexport * from \"./domain/JsonMap\";\nexport * from \"./domain/JsonMethodStore\";\nexport * from \"./domain/JsonOperation\";\nexport * from \"./domain/JsonOperationPathsMap\";\nexport * from \"./domain/JsonOperationRoute\";\nexport * from \"./domain/JsonParameter\";\nexport * from \"./domain/JsonParameterStore\";\nexport * from \"./domain/JsonParameterTypes\";\nexport * from \"./domain/JsonPropertyStore\";\nexport * from \"./domain/JsonRequestBody\";\nexport * from \"./domain/JsonResponse\";\nexport * from \"./domain/JsonSchema\";\nexport * from \"./domain/SpecTypes\";\nexport * from \"./hooks/alterIgnore\";\nexport * from \"./hooks/alterOneOf\";\nexport * from \"./hooks/alterRequiredGroups\";\nexport * from \"./interfaces/IgnoreCallback\";\nexport * from \"./interfaces/JsonHookContext\";\nexport * from \"./interfaces/JsonOpenSpec\";\nexport * from \"./interfaces/JsonSchemaOptions\";\nexport * from \"./registries/JsonSchemaMapperContainer\";\nexport * from \"./registries/enumRegistries\";\nexport * from \"./utils/buildPath\";\nexport * from \"./utils/concatParameters\";\nexport * from \"./utils/concatPath\";\nexport * from \"./utils/defineStatusModel\";\nexport * from \"./utils/from\";\nexport * from \"./utils/generateSpec\";\nexport * from \"./utils/generics\";\nexport * from \"./utils/getComputedType\";\nexport * from \"./utils/getInheritedStores\";\nexport * from \"./utils/getJsonEntityStore\";\nexport * from \"./utils/getJsonPathParameters\";\nexport * from \"./utils/getJsonSchema\";\nexport * from \"./utils/getJsonType\";\nexport * from \"./utils/getOperationsRoutes\";\nexport * from \"./utils/getOperationsStores\";\nexport * from \"./utils/getPropertiesStores\";\nexport * from \"./utils/getRequiredProperties\";\nexport * from \"./utils/getSpec\";\nexport * from \"./utils/getSpecType\";\nexport * from \"./utils/isSuccessStatus\";\nexport * from \"./utils/mapHeaders\";\nexport * from \"./utils/mapNullableType\";\nexport * from \"./utils/mapOpenSpec\";\nexport * from \"./utils/mapOpenSpec2\";\nexport * from \"./utils/mapOpenSpec3\";\nexport * from \"./utils/mapOpenSpecInfo\";\nexport * from \"./utils/mapRouteOptions\";\nexport * from \"./utils/matchGroups\";\nexport * from \"./utils/mergeOperation\";\nexport * from \"./utils/mergeSpec\";\nexport * from \"./utils/operationIdFormatter\";\nexport * from \"./utils/ref\";\nexport * from \"./utils/serializeEnumValues\";\nexport * from \"./utils/toJsonMapCollection\";\nexport * from \"./utils/toJsonRegex\";\nexport * from \"./utils/transformToOS2\";\nexport * from \"./utils/withErrorMsg\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;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qB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IgnoreCallback.js","sourceRoot":"","sources":["../../../src/interfaces/IgnoreCallback.ts"],"names":[],"mappings":"","sourcesContent":["import {JsonHookContext} from \"./JsonHookContext\";\n\nexport interface IgnoreCallback {\n (value: boolean, ctx: JsonHookContext): boolean;\n}\n"]}
1
+ {"version":3,"file":"IgnoreCallback.js","sourceRoot":"","sources":["../../../src/interfaces/IgnoreCallback.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"JsonHookContext.js","sourceRoot":"","sources":["../../../src/interfaces/JsonHookContext.ts"],"names":[],"mappings":"","sourcesContent":["declare global {\n namespace TsED {\n interface JsonHookContext {}\n }\n}\n\nexport interface JsonHookContext extends TsED.JsonHookContext {\n /**\n * The current instance used by serializer function\n */\n self: any;\n /**\n *\n */\n groups?: string[] | false;\n\n [key: string]: any;\n}\n"]}
1
+ {"version":3,"file":"JsonHookContext.js","sourceRoot":"","sources":["../../../src/interfaces/JsonHookContext.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"JsonOpenSpec.js","sourceRoot":"","sources":["../../../src/interfaces/JsonOpenSpec.ts"],"names":[],"mappings":"","sourcesContent":["import {OS3Header} from \"@tsed/openspec\";\n\nexport interface JsonHeader extends OS3Header {}\n\nexport interface JsonHeaders {\n [key: string]: number | string | (JsonHeader & {type?: string; value?: string | number});\n}\n"]}
1
+ {"version":3,"file":"JsonOpenSpec.js","sourceRoot":"","sources":["../../../src/interfaces/JsonOpenSpec.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"JsonSchemaOptions.js","sourceRoot":"","sources":["../../../src/interfaces/JsonSchemaOptions.ts"],"names":[],"mappings":"","sourcesContent":["import {OpenSpecHash, OS2Schema, OS3Schema} from \"@tsed/openspec\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\n\nexport interface JsonSchemaOptions {\n /**\n * Map properties with the alias name. By default: false\n */\n useAlias?: boolean;\n /**\n * Reference to Schema Object.\n */\n schemas?: OpenSpecHash<OS3Schema | OS2Schema>;\n /**\n * Define Spec types level\n */\n specType?: SpecTypes;\n /**\n * Define a groups restriction to generate the JsonSchema.\n * Set false to disable groups.\n */\n groups?: string[] | false;\n /**\n * Set the postfix groups name for generated model and ref.\n */\n groupsName?: string;\n /**\n * Generate custom keys when SpecType is JSON.\n */\n customKeys?: boolean;\n\n [key: string]: any;\n}\n"]}
1
+ {"version":3,"file":"JsonSchemaOptions.js","sourceRoot":"","sources":["../../../src/interfaces/JsonSchemaOptions.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"JsonSchemaMapperContainer.js","sourceRoot":"","sources":["../../../src/registries/JsonSchemaMapperContainer.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,0BAA0B,GAAkC,IAAI,GAAG,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY,EAAE,MAAwB;IAC7E,OAAO,0BAA0B,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,uBAAuB;IACvB,IAAI,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,wBAAwB,CAAC,CAAC;KAC7D;IACD,OAAO,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAW,EAAE,OAAY,EAAE,MAAY;IAC9E,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["/**\n * @ignore\n */\nexport interface JsonSchemaMapper {\n (schema: any, options: any, parent?: any): any;\n}\n\n/**\n * @ignore\n */\nconst JsonSchemaMappersContainer: Map<string, JsonSchemaMapper> = new Map();\n\n/**\n * @ignore\n */\nexport function registerJsonSchemaMapper(type: string, mapper: JsonSchemaMapper) {\n return JsonSchemaMappersContainer.set(type, mapper);\n}\n\n/**\n * @ignore\n */\nexport function getJsonSchemaMapper(type: string): JsonSchemaMapper {\n // istanbul ignore next\n if (!JsonSchemaMappersContainer.has(type)) {\n throw new Error(`JsonSchema ${type} mapper doesn't exists`);\n }\n return JsonSchemaMappersContainer.get(type)!;\n}\n\n/**\n * @ignore\n */\nexport function execMapper(type: string, schema: any, options: any, parent?: any): any {\n return getJsonSchemaMapper(type)(schema, options, parent);\n}\n\nexport function hasMapper(type: string) {\n return JsonSchemaMappersContainer.has(type);\n}\n"]}
1
+ {"version":3,"file":"JsonSchemaMapperContainer.js","sourceRoot":"","sources":["../../../src/registries/JsonSchemaMapperContainer.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,0BAA0B,GAAkC,IAAI,GAAG,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAY,EAAE,MAAwB;IAC7E,OAAO,0BAA0B,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,uBAAuB;IACvB,IAAI,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,wBAAwB,CAAC,CAAC;KAC7D;IACD,OAAO,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAW,EAAE,OAAY,EAAE,MAAY;IAC9E,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"enumRegistries.js","sourceRoot":"","sources":["../../../src/registries/enumRegistries.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC","sourcesContent":["import {JsonSchema} from \"../domain/JsonSchema\";\n\nexport const enumsRegistry = new Map<any, JsonSchema>();\n"]}
1
+ {"version":3,"file":"enumRegistries.js","sourceRoot":"","sources":["../../../src/registries/enumRegistries.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildPath.js","sourceRoot":"","sources":["../../../src/utils/buildPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC","sourcesContent":["/**\n * Return a sanitized path\n * @param path\n * @ignore\n */\nexport function buildPath(path: string) {\n return path.split(\"/\").filter(Boolean).join(\"/\");\n}\n"]}
1
+ {"version":3,"file":"buildPath.js","sourceRoot":"","sources":["../../../src/utils/buildPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"concatParameters.js","sourceRoot":"","sources":["../../../src/utils/concatParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAiB,EAAE,SAAc;IAChE,OAAO,UAAU;SACd,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC;QAE5F,OAAO,CAAC,IAAI,KAAK,CAAC;IACpB,CAAC,CAAC;SACD,MAAM,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC;AACjF,CAAC","sourcesContent":["/**\n * @ignore\n */\nexport function concatParameters(parameters: any[], operation: any) {\n return parameters\n .map((param) => {\n const f = operation.parameters.find((p: any) => p.in === param.in && p.name === param.name);\n\n return f || param;\n })\n .concat(...operation.parameters.filter((param: any) => param.in !== \"path\"));\n}\n"]}
1
+ {"version":3,"file":"concatParameters.js","sourceRoot":"","sources":["../../../src/utils/concatParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAiB,EAAE,SAAc;IAChE,OAAO,UAAU;SACd,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,CAAC,GAAG,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CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KAC3H;IAED,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACtE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACtB;IAED,MAAM,MAAM,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAE/C,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClF,CAAC","sourcesContent":["export function concatPath(basePath: string | undefined | RegExp, path: string | undefined | RegExp): any {\n if (basePath instanceof RegExp || path instanceof RegExp) {\n if (!basePath) {\n return path;\n }\n\n if (!path) {\n return basePath;\n }\n\n const r1 = basePath instanceof RegExp ? basePath : new RegExp(basePath, \"gi\");\n const r2 = path instanceof RegExp ? path : new RegExp(path, \"gi\");\n\n return new RegExp(r1.source + r2.source, (r1.global ? \"g\" : \"\") + (r1.ignoreCase ? \"i\" : \"\") + (r1.multiline ? \"m\" : \"\"));\n }\n\n if (basePath && path && basePath.endsWith(\"/\") && path.startsWith(\"/\")) {\n path = path.slice(1);\n }\n\n const result = (basePath || \"\") + (path || \"\");\n\n return result.endsWith(\"/\") && result.length > 1 ? result.slice(0, -1) : result;\n}\n"]}
1
+ {"version":3,"file":"concatPath.js","sourceRoot":"","sources":["../../../src/utils/concatPath.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,QAAqC,EAAE,IAAiC;IACjG,IAAI,QAAQ,YAAY,MAAM,IAAI,IAAI,YAAY,MAAM,EAAE;QACxD,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"version":3,"file":"defineStatusModel.js","sourceRoot":"","sources":["../../../src/utils/defineStatusModel.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAA2B,IAAI,GAAG,EAAE,CAAC;AAExD,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,KAAgB;IAChE,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\n\nconst statusesModel: Map<number, Type<any>> = new Map();\n\nexport function defineStatusModel(status: number, model: Type<any>) {\n statusesModel.set(status, model);\n}\n\nexport function getStatusModel(status: number) {\n return statusesModel.get(status);\n}\n"]}
1
+ {"version":3,"file":"defineStatusModel.js","sourceRoot":"","sources":["../../../src/utils/defineStatusModel.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAA2B,IAAI,GAAG,EAAE,CAAC;AAExD,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,KAAgB;IAChE,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"from.js","sourceRoot":"","sources":["../../../src/utils/from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAO,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,aAA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AAC,GAAG,KAAY;IACjC,OAAO,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAY;IACnC,OAAO,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAY;IACnC,OAAO,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAC,GAAG,KAAY;IACnC,OAAO,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,EAAmB;IACzC,IAAI;QACF,2CAA2C;QAC3C,IAAI,EAAE,EAAE,EAAE;YACR,6BAA6B;YAC7B,OAAO,eAAe,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,MAAa,CAAC;SACjD;KACF;IAAC,OAAO,EAAE,EAAE,GAAE;IAEf,OAAO,IAAI,WAAW,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC;AACD,MAAM,UAAU,KAAK,CAAC,CAAsB;IAC1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAE7B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {isClass, Type} from \"@tsed/core\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {JsonFormatTypes} from \"../domain/JsonFormatTypes\";\nimport {JsonLazyRef} from \"../domain/JsonLazyRef\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\nimport {enumsRegistry} from \"../registries/enumRegistries\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * Create a new model from the given type.\n *\n * ```typescript\n * from(String)\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function from(type: Type<any> = Object) {\n if (isClass(type)) {\n const {schema} = getJsonEntityStore(type);\n\n schema.properties = function properties(obj: {[key: string]: JsonSchema}) {\n Object.entries(obj).forEach(([propertyKey, propSchema]) => {\n getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);\n });\n\n return this;\n };\n\n return schema;\n }\n\n return JsonSchema.from({type});\n}\n\n/**\n * Declare a new number model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function number() {\n return from(Number);\n}\n\n/**\n * Declare a new integer model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function integer() {\n return from(Number).integer();\n}\n\n/**\n * Declare a new string model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function string() {\n return from(String);\n}\n\n/**\n * Declare a new boolean model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function boolean() {\n return from(Boolean);\n}\n\n/**\n * Declare a new string model with `format: date`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function date() {\n return from(Date).format(JsonFormatTypes.DATE);\n}\n\n/**\n * Declare a new string model with `format: datetime`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function datetime() {\n return from(Date).format(JsonFormatTypes.DATE_TIME);\n}\n\n/**\n * Declare a new string model with `format: time`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function time() {\n return from(Date).format(JsonFormatTypes.TIME);\n}\n\n/**\n * Declare a new string model with `format: email`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function email() {\n return from(String).format(JsonFormatTypes.EMAIL);\n}\n\n/**\n * Declare a new string model with `format: uri`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function uri() {\n return from(String).format(JsonFormatTypes.URI);\n}\n\n/**\n * Declare a new string model with `format: url`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function url() {\n return from(String).format(JsonFormatTypes.URL);\n}\n\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"array\"\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function array() {\n return from(Array);\n}\n\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"additionalProperties\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function map() {\n return from(Map).unknown(true);\n}\n\n/**\n * Declare a new array model with `uniqueItems: true`.\n *\n * ```json\n * {\n * \"type\": \"array\",\n * \"uniqueItems\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function set() {\n return from(Array).uniqueItems(true);\n}\n\n/**\n * Declare a new object model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function object(properties: {[key: string]: JsonSchema} = {}) {\n return from(Object).properties(properties);\n}\n\n/**\n * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function any(...types: any[]) {\n return from().any(...types);\n}\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n * @schemaFunctional\n */\nexport function anyOf(...anyOf: any[]) {\n return from().anyOf(anyOf);\n}\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\nexport function oneOf(...oneOf: any[]) {\n return from().oneOf(oneOf);\n}\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n * @schemaFunctional\n */\nexport function allOf(...allOf: any[]) {\n return from().allOf(allOf);\n}\n\n/**\n * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.\n *\n * @schemaFunctional\n */\nexport function lazyRef(cb: () => Type<any>) {\n try {\n // solve issue with a self referenced model\n if (cb()) {\n // type is already accessible\n return JsonEntityStore.from(cb()).schema as any;\n }\n } catch (er) {}\n\n return new JsonLazyRef(cb);\n}\nexport function enums(e: Record<string, any>) {\n const schema = string().enum(e);\n enumsRegistry.set(e, schema);\n\n return schema;\n}\n"]}
1
+ {"version":3,"file":"from.js","sourceRoot":"","sources":["../../../src/utils/from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAO,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,IAAI,CAAC,OAAkB,MAAM;IAC3C,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;QACjB,MAAM,EAAC,MAAM,E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} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3} from \"@tsed/openspec\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {getSpec, JsonTokenOptions, SpecSerializerOptions} from \"./getSpec\";\nimport {getSpecTypeFromSpec} from \"./getSpecType\";\nimport {mapOpenSpec} from \"./mapOpenSpec\";\nimport {mergeSpec} from \"./mergeSpec\";\nimport {transformToOS2} from \"./transformToOS2\";\n\nexport interface GenerateSpecOptions extends Omit<SpecSerializerOptions, \"specType\"> {\n tokens: JsonTokenOptions;\n version?: string;\n acceptMimes?: string;\n specPath?: string;\n specVersion?: string;\n spec?: any;\n}\n/* node_env:start */\nasync function readSpec(path: string) {\n const {default: fs} = await import(\"fs-extra\");\n if (fs.existsSync(path)) {\n try {\n return await fs.readJSON(path, {encoding: \"utf8\"});\n } catch (e) {}\n }\n\n /* istanbul ignore next */\n return {};\n}\n/* node_env:end */\n/**\n * Generate OpenAPI spec from multiple sources (models, files, conf)\n * @param tokens\n * @param options\n */\nexport async function generateSpec({tokens, ...options}: GenerateSpecOptions): Promise<OpenSpec2 | OpenSpec3> {\n const {version = \"1.0.0\", acceptMimes, specPath, specVersion} = options;\n const fileSpec: Partial<OpenSpec2 | OpenSpec3> = /* node_env:start */ specPath ? await readSpec(specPath) : /* node_env:end */ {};\n\n const defaultSpec = mapOpenSpec(getValue(options, \"spec\", {}), {\n fileSpec,\n version,\n specVersion,\n acceptMimes\n });\n\n const specType = getSpecTypeFromSpec(defaultSpec);\n\n let controllersSpec: any = getSpec(tokens, options);\n const spec: any = mergeSpec(defaultSpec, controllersSpec);\n\n if (specType === SpecTypes.SWAGGER) {\n return transformToOS2(spec) as any;\n }\n\n return spec;\n}\n"]}
1
+ {"version":3,"file":"generateSpec.js","sourceRoot":"","sources":["../../../src/utils/generateSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,C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AQ,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,IAAI,GAAQ,SAAS,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAE1D,IAAI,QAAQ,KAAK,SAAS,CAAC,OAAO,EAAE;QAClC,OAAO,cAAc,CAAC,IAAI,CAAQ,CAAC;KACpC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generics.js","sourceRoot":"","sources":["../../../src/utils/generics.ts"],"names":[],"mappings":"AA4CA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,aAAuB,EAAE,YAA4B;IAClF,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,GAAqB,EAAE,IAAY,EAAE,KAAa,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACrI,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA8C;IAC/E,IAAI,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE;QACjD,MAAM,EAAC,aAAa,EAAE,YAAY,EAAE,GAAG,GAAG,EAAC,GAAG,OAAO,CAAC;QAEtD,OAAO;YACL,GAAG,GAAG;YACN,QAAQ,EAAE,cAAc,CAAC,aAAa,EAAE,YAAY,CAAC;SACtD,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAqB;IAC/C,MAAM,CAAC,YAAY,EAAE,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC;IAEpD,OAAO;QACL,YAAY;QACZ,cAAc,EAAE,GAAG;KACpB,CAAC;AACJ,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {JsonSchema} from \"../domain/JsonSchema\";\n\nexport type GenericValue = Type<any> | JsonSchema | any;\n\n/**\n * @ignore\n */\nexport type GenericsMap = Map<string, GenericValue>;\n\n/**\n * @ignore\n */\nexport interface GenericTypes {\n genericTypes: Type<any>[];\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nexport interface GenericLabels {\n genericLabels: string[];\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nexport interface NestedGenerics {\n nestedGenerics: GenericValue[][];\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nexport interface GenericsContext extends GenericTypes, GenericLabels, NestedGenerics {\n generics: GenericsMap;\n}\n\n/**\n * @ignore\n * @param genericLabels\n * @param genericTypes\n */\nexport function getGenericsMap(genericLabels: string[], genericTypes: GenericValue[]): GenericsMap {\n return genericLabels.reduce((map: Map<string, any>, item: string, index: number) => map.set(item, genericTypes[index]), new Map());\n}\n\n/**\n * @ignore\n * @param options\n */\nexport function mapGenericsOptions(options: Partial<GenericTypes & GenericLabels>) {\n if (options.genericLabels && options.genericTypes) {\n const {genericLabels, genericTypes, ...ops} = options;\n\n return {\n ...ops,\n generics: getGenericsMap(genericLabels, genericTypes)\n };\n }\n\n return options;\n}\n\n/**\n * @ignore\n * @param value\n */\nexport function popGenerics(value: NestedGenerics): NestedGenerics & GenericTypes {\n const [genericTypes, ...out] = value.nestedGenerics;\n\n return {\n genericTypes,\n nestedGenerics: out\n };\n}\n"]}
1
+ {"version":3,"file":"generics.js","sourceRoot":"","sources":["../../../src/utils/generics.ts"],"names":[],"mappings":"AA4CA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,aAAuB,EAAE,YAA4B;IAClF,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,GAAqB,EAAE,IAAY,EAAE,KAAa,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACrI,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA8C;IAC/E,IAAI,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,YAAY,EAAE;QACjD,MAAM,EAAC,aAAa,EAAE,YAAY,EAAE,GAAG,GAAG,EAAC,GAAG,OAAO,CAAC;QAEtD,OAAO;YACL,GAAG,GAAG;YACN,QAAQ,EAAE,cAAc,CAAC,aAAa,EAAE,YAAY,CAAC;SACtD,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAqB;IAC/C,MAAM,CAAC,YAAY,EAAE,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC;IAEpD,OAAO;QACL,YAAY;QACZ,cAAc,EAAE,GAAG;KACpB,CAAC;AACJ,CAAC"}
@@ -3,7 +3,7 @@ import { classOf, isArrowFn, isClass, isClassObject, isCollection, isDate, isPri
3
3
  * @ignore
4
4
  */
5
5
  export function getComputedType(target) {
6
- if (isPromise(target)) {
6
+ if (isPromise(target) || target === Function) {
7
7
  return Object;
8
8
  }
9
9
  if (isClass(target) ||
@@ -1 +1 @@
1
- {"version":3,"file":"getComputedType.js","sourceRoot":"","sources":["../../../src/utils/getComputedType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,OAAO,EACP,aAAa,EACb,YAAY,EACZ,MAAM,EACN,2BAA2B,EAC3B,SAAS,EACT,QAAQ,EAET,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAW;IACzC,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE;QACrB,OAAO,MAAM,CAAC;KACf;IAED,IACE,OAAO,CAAC,MAAM,CAAC;QACf,QAAQ,CAAC,MAAM,CAAC;QAChB,2BAA2B,CAAC,MAAM,CAAC;QACnC,aAAa,CAAC,MAAM,CAAC;QACrB,MAAM,CAAC,MAAM,CAAC;QACd,YAAY,CAAC,MAAM,CAAC,EACpB;QACA,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;KACxB;IAED,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE;QACrB,OAAQ,MAAc,EAAE,CAAC;KAC1B;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import {\n classOf,\n isArrowFn,\n isClass,\n isClassObject,\n isCollection,\n isDate,\n isPrimitiveOrPrimitiveClass,\n isPromise,\n isSymbol,\n Type\n} from \"@tsed/core\";\n\n/**\n * @ignore\n */\nexport function getComputedType(target: any): Type<any> {\n if (isPromise(target)) {\n return Object;\n }\n\n if (\n isClass(target) ||\n isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isCollection(target)\n ) {\n return classOf(target);\n }\n\n if (isArrowFn(target)) {\n return (target as any)();\n }\n\n return target;\n}\n"]}
1
+ {"version":3,"file":"getComputedType.js","sourceRoot":"","sources":["../../../src/utils/getComputedType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,OAAO,EACP,aAAa,EACb,YAAY,EACZ,MAAM,EAEN,2BAA2B,EAC3B,SAAS,EACT,QAAQ,EAET,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAW;IACzC,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,KAAK,QAAQ,EAAE;QAC5C,OAAO,MAAM,CAAC;KACf;IAED,IACE,OAAO,CAAC,MAAM,CAAC;QACf,QAAQ,CAAC,MAAM,CAAC;QAChB,2BAA2B,CAAC,MAAM,CAAC;QACnC,aAAa,CAAC,MAAM,CAAC;QACrB,MAAM,CAAC,MAAM,CAAC;QACd,YAAY,CAAC,MAAM,CAAC,EACpB;QACA,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;KACxB;IAED,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE;QACrB,OAAQ,MAAc,EAAE,CAAC;KAC1B;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getInheritedStores.js","sourceRoot":"","sources":["../../../src/utils/getInheritedStores.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAO,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAuB;IACxD,MAAM,KAAK,GAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAiB,MAAM,CAAC,CAAC;IAEnG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;QACrB,KAAK,CAAC,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC;aACzC,OAAO,EAAE;aACT,MAAM,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;YACzB,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;KACjB;IAED,OAAO,KAAK,CAAC,UAAU,CAAC;AAC1B,CAAC","sourcesContent":["import {ancestorsOf, Type} from \"@tsed/core\";\nimport type {JsonClassStore} from \"../domain/JsonClassStore\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * Return store and his inherited stores\n * @param target\n * @ignore\n */\nexport function getInheritedStores(target: Type<any> | any): Map<Type<any>, JsonClassStore> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore<JsonClassStore>(target);\n\n if (!store.$inherited) {\n store.$inherited = ancestorsOf(store.target)\n .reverse()\n .reduce((context, model) => {\n return context.set(model, getJsonEntityStore(model));\n }, new Map());\n }\n\n return store.$inherited;\n}\n"]}
1
+ {"version":3,"file":"getInheritedStores.js","sourceRoot":"","sources":["../../../src/utils/getInheritedStores.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAO,MAAM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AAK,EAAE,kBAAkB,CAAC,CAAC;AACpE,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAsBlE,MAAM,UAAU,kBAAkB,CAA8C,GAAG,IAAW;IAC5F,OAAO,eAAe,CAAC,IAAI,CAAI,GAAG,IAAI,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import {DecoratorTypes, Type} from \"@tsed/core\";\nimport {JsonEntitiesContainer, JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {JsonClassStore} from \"../domain/JsonClassStore\";\nimport {JsonPropertyStore} from \"../domain/JsonPropertyStore\";\nimport {JsonParameterStore} from \"../domain/JsonParameterStore\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore\";\n\nJsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);\nJsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);\nJsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);\nJsonEntitiesContainer.set(DecoratorTypes.METHOD, JsonMethodStore);\n\n/**\n * Get entity store from decorator args\n * @param target\n */\nexport function getJsonEntityStore<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;\nexport function getJsonEntityStore<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any,\n propertyKey: string | symbol\n): T;\nexport function getJsonEntityStore<T extends JsonParameterStore = JsonParameterStore>(\n target: Type<any> | any,\n propertyKey: string | symbol,\n index: number\n): T;\nexport function getJsonEntityStore<T extends JsonMethodStore = JsonMethodStore>(\n target: Type<any> | any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor\n): T;\nexport function getJsonEntityStore<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T;\nexport function getJsonEntityStore<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T {\n return JsonEntityStore.from<T>(...args);\n}\n"]}
1
+ {"version":3,"file":"getJsonEntityStore.js","sourceRoot":"","sources":["../../../src/utils/getJsonEntityStore.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AACR,CAAC","sourcesContent":["/**\n * @ignore\n */\nfunction getVariable(subpath: string) {\n const [prefix, right] = subpath.split(\"=\");\n const splited = (right || prefix).split(\".\");\n const name = splited.splice(0, 1)[0];\n\n return {\n prefix: right && prefix ? `${prefix}=` : \"\",\n name,\n postfix: splited.length ? `.${splited.join(\".\")}` : \"\"\n };\n}\n\nfunction parseUrl(key: string) {\n let inCapture = 0;\n\n return key\n .split(\"\")\n .filter((c) => {\n if (c === \"(\") {\n inCapture++;\n }\n\n const result = inCapture === 0;\n\n if (c === \")\") {\n inCapture--;\n }\n\n return result;\n })\n .join(\"\")\n .split(\"/\")\n .filter((o) => !!o);\n}\n\n/**\n * @ignore\n */\nexport function getJsonPathParameters(base: string, path: string | RegExp | (string | RegExp)[] = \"\"): {path: string; parameters: any[]}[] {\n if (path instanceof RegExp) {\n path = path.toString().replace(/^\\//g, \"\").replace(/\\/$/g, \"\").replace(/\\\\/g, \"\");\n }\n\n const params: any[] = [];\n const paths: any[] = [];\n let isOptional = false;\n let current = \"\";\n\n parseUrl(`${base}${path}`).map((key) => {\n const subpath = key.replace(\":\", \"\").replace(\"?\", \"\");\n\n if (key.includes(\":\")) {\n const optional = key.includes(\"?\");\n\n // Append previous config\n if (optional && !isOptional) {\n isOptional = true;\n\n paths.push({\n path: current,\n parameters: [].concat(params as any)\n });\n }\n\n const {prefix, name, postfix} = getVariable(subpath);\n current += `/${prefix}{${name}}${postfix}`;\n\n params.push({\n in: \"path\",\n name,\n type: \"string\",\n required: true\n });\n\n if (optional && isOptional) {\n paths.push({\n path: current,\n parameters: [].concat(params as any)\n });\n }\n } else {\n current += `/${key}`;\n }\n });\n\n return paths.length\n ? paths\n : [\n {\n path: current,\n parameters: [].concat(params as any)\n }\n ];\n}\n"]}
1
+ {"version":3,"file":"getJsonPathParameters.js","sourceRoot":"","sources":["../../../src/utils/getJsonPathParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,SAAS,WAAW,CAAC,OAAe;IAClC,MAAM,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CAAC;IAE5B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACnB,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE;YACvC,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;SACtC;QAED,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;KACxB;IAED,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAEnC,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAsB,EAAE,UAA6B,EAAE;IACnF,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAEzC,OAAO,GAAG;QACR,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,EAAE;QACV,GAAG,OAAO;QACV,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAC,IAAI;QAC5C,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,IAAI,MAAM,CAAC,aAAa,KAAK,WAAW,EAAE;QACxC,OAAO,GAAG;YACR,GAAG,OAAO;YACV,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;YACtC,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM;SACjC,CAAC;KACH;IAED,OAAO,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport \"../components/anyMapper\";\nimport \"../components/classMapper\";\nimport \"../components/genericsMapper\";\nimport \"../components/inheritedClassMapper\";\nimport \"../components/itemMapper\";\nimport \"../components/lazyRefMapper\";\nimport \"../components/mapMapper\";\nimport \"../components/objectMapper\";\nimport \"../components/ofMapper\";\nimport \"../components/propertiesMapper\";\nimport \"../components/schemaMapper\";\nimport type {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * @ignore\n */\nconst CACHE_KEY = \"$cache:schemes\";\n\n/**\n * @ignore\n */\nfunction getKey(options: any) {\n return JSON.stringify(options);\n}\n\n/**\n * @ignore\n */\nfunction get(entity: JsonEntityStore, options: any) {\n const cache: Map<string, any> = entity.store.get(CACHE_KEY) || new Map();\n const key = getKey(options);\n\n if (!cache.has(key)) {\n const schema = execMapper(\"schema\", entity.schema, options);\n\n if (Object.keys(options.schemas).length) {\n schema.definitions = options.schemas;\n }\n\n cache.set(key, schema);\n }\n\n entity.store.set(CACHE_KEY, cache);\n\n return cache.get(key);\n}\n\nexport function getJsonSchema(model: Type<any> | any, options: JsonSchemaOptions = {}) {\n const entity = getJsonEntityStore(model);\n\n options = {\n endpoint: true,\n groups: [],\n ...options,\n specType: options.specType || SpecTypes.JSON,\n schemas: {}\n };\n\n if (entity.decoratorType === \"parameter\") {\n options = {\n ...options,\n genericTypes: entity.nestedGenerics[0],\n nestedGenerics: entity.nestedGenerics,\n groups: entity.parameter?.groups\n };\n }\n\n return get(entity, options);\n}\n"]}
1
+ {"version":3,"file":"getJsonSchema.js","sourceRoot":"","sources":["../../../src/utils/getJsonSchema.ts"],"names":[],"mappings":"AACA,OAAO,yBAAyB,CAAC;AACjC,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AACtC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,0BAA0B,CAAC;AAClC,OAAO,6BAA6B,CAAC;AACrC,OAAO,yBAAyB,CAAC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AClB;QAED,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;KAC3B;IAED,IAAI,KAAK,KAAK,KAAK,EAAE;QACnB,OAAO,OAAO,CAAC;KAChB;IAED,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;QAClB,OAAO,KAAK,CAAC,GAAG,CAAC,WAAW,CAAQ,CAAC;KACtC;IAED,IAAI,KAAK,KAAK,GAAG,EAAE;QACjB,OAAO,OAAO,CAAC;KAChB;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;QACpC,OAAO,QAAQ,CAAC;KACjB;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import {isArray, isBuffer, isDate, isPrimitiveOrPrimitiveClass, primitiveOf} from \"@tsed/core\";\n\n/**\n * @ignore\n */\nexport const JSON_TYPES = [\"string\", \"number\", \"integer\", \"boolean\", \"object\", \"array\", \"null\", \"any\"];\n\nexport function getJsonType(value: any): string {\n if (value === null) {\n return \"null\";\n }\n\n if (isPrimitiveOrPrimitiveClass(value)) {\n if (JSON_TYPES.indexOf(value as string) > -1) {\n return value;\n }\n\n if (typeof value === \"string\") {\n if (value === \"file\") {\n return \"file\";\n }\n\n return \"generic\";\n }\n\n return primitiveOf(value);\n }\n\n if (value === Array) {\n return \"array\";\n }\n\n if (isArray(value)) {\n return value.map(getJsonType) as any;\n }\n\n if (value === Set) {\n return \"array\";\n }\n\n if (isDate(value) || isBuffer(value)) {\n return \"string\";\n }\n\n return \"object\";\n}\n"]}
1
+ {"version":3,"file":"getJsonType.js","sourceRoot":"","sources":["../../../src/utils/getJsonType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,2BAA2B,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAE/F;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,E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EAAE;IAExC,MAAM,KAAK,GAAoB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1D,IAAI,gBAAgB,GAAiC,EAAE,CAAC;IAExD,IAAI,OAAO,CAAC,YAAY,EAAE;QACxB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAS,qBAAqB,EAAE,EAAE,CAAC,CAAC;QAE9D,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,KAAK,EAAE,EAAE;YAC7D,OAAO,gBAAgB,CAAC,MAAM,CAC5B,mBAAmB,CAAC,KAAK,EAAE;gBACzB,GAAG,OAAO;gBACV,QAAQ;aACT,CAAC,CACH,CAAC;QACJ,CAAC,EAAE,gBAAgB,CAAC,CAAC;KACtB;IAED,OAAO,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE;QAC1E,MAAM,EAAC,SAAS,EAAC,GAAG,QAAQ,CAAC;QAE7B,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;gBACjD,MAAM,CAAC,IAAI,CACT,IAAI,kBAAkB,CAAS;oBAC7B,QAAQ;oBACR,KAAK;oBACL,QAAQ;oBACR,aAAa;iBACd,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,gBAAgB,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore\";\nimport {getOperationsStores} from \"./getOperationsStores\";\nimport {JsonOperationRoute} from \"../domain/JsonOperationRoute\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\nimport {concatPath} from \"./concatPath\";\n\nexport interface GetOperationsRoutesOptions {\n withChildren?: boolean;\n basePath?: string;\n}\n\nexport function getOperationsRoutes<Entity extends JsonMethodStore = JsonMethodStore>(\n token: Type<any> | any,\n options: GetOperationsRoutesOptions = {}\n): JsonOperationRoute<Entity>[] {\n const store: JsonEntityStore = token.isStore ? token : getJsonEntityStore(token);\n const basePath = concatPath(options.basePath, store.path);\n let operationsRoutes: JsonOperationRoute<Entity>[] = [];\n\n if (options.withChildren) {\n const children = store.get<Type[]>(\"childrenControllers\", []);\n\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(\n getOperationsRoutes(token, {\n ...options,\n basePath\n })\n );\n }, operationsRoutes);\n }\n\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const {operation} = endpoint;\n\n if (operation) {\n operation.operationPaths.forEach((operationPath) => {\n routes.push(\n new JsonOperationRoute<Entity>({\n basePath,\n token,\n endpoint,\n operationPath\n })\n );\n });\n }\n\n return routes;\n }, operationsRoutes);\n}\n"]}
1
+ {"version":3,"file":"getOperationsRoutes.js","sourceRoot":"","sources":["../../../src/utils/getOperationsRoutes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,kBAAkB,EAAC,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAOxC,MAAM,UAAU,mBAAmB,CACjC,KAAsB,EACtB,UAAsC,EAAE;IAExC,MAAM,KAAK,GAAoB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CA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,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAA8C,MAAuB;IACtG,MAAM,KAAK,GAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEnF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QACtB,MAAM,cAAc,GAAG,IAAI,qBAAqB,EAAE,CAAC;QACnD,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,EAAa,CAAC;QAEzC,kBAAkB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YACjD,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBAC1C,IAAI,SAAS,YAAY,eAAe,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;oBACzF,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;iBACzD;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAAsB,EAAE,EAAE;YACnD,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;gBACvD,cAAc,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,KAAK,EAAE,CAAC;KACxB;IAED,OAAO,KAAK,CAAC,WAAW,CAAC;AAC3B,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore\";\nimport type {JsonClassStore} from \"../domain/JsonClassStore\";\nimport {JsonOperationPathsMap} from \"../domain/JsonOperationPathsMap\";\nimport {getInheritedStores} from \"./getInheritedStores\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * @ignore\n */\nexport function getOperationsStores<T extends JsonMethodStore = JsonMethodStore>(target: Type<any> | any): Map<string, T> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore(target);\n\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map<string, T>();\n\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n\n store.$operations.forEach((store: JsonMethodStore) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n\n operationPaths.clear();\n }\n\n return store.$operations;\n}\n"]}
1
+ {"version":3,"file":"getOperationsStores.js","sourceRoot":"","sources":["../../../src/utils/getOperationsStores.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,qBAAqB,EAAC,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAA8C,MAAuB;IACtG,MAAM,KAAK,GAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEnF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QACtB,MAAM,cAAc,GAAG,IAAI,qBAAqB,EAAE,CAAC;QACnD,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,EAAa,CAAC;QAEzC,kBAAkB,CAAC,KAAK,CAAC,CAAC,OAAO,CA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GAAG,IAAI,GAAG,EAAE,CAAC;QAE9B,MAAM,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YAC9B,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBAC1C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;oBACjD,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;iBACzD;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,KAAK,CAAC,WAAW,CAAC;AAC3B,CAAC;AAYD;;GAEG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAuB,EACvB,UAAgC,EAAE;IAElC,MAAM,MAAM,GAAG,mBAAmB,CAAI,MAAM,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAqC,IAAI,GAAG,EAAE,CAAC;IAExD,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC5B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,IAAI,WAAW,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE;gBAC1C,OAAO;aACR;SACF;QAED,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import {Type} from \"@tsed/core\";\nimport type {JsonClassStore} from \"../domain/JsonClassStore\";\nimport type {JsonPropertyStore} from \"../domain/JsonPropertyStore\";\nimport {alterIgnore} from \"../hooks/alterIgnore\";\nimport {getInheritedStores} from \"./getInheritedStores\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\n\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any\n): Map<string | symbol | number, T> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore(target);\n\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n\n return store.$properties;\n}\n\n/**\n * @ignore\n */\nexport interface GetPropertiesOptions {\n withIgnoredProps?: boolean;\n groups?: string[] | false;\n\n [type: string]: any;\n}\n\n/**\n * @ignore\n */\nexport function getProperties<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any,\n options: GetPropertiesOptions = {}\n) {\n const stores = getPropertiesStores<T>(target);\n const map: Map<string | symbol | number, T> = new Map();\n\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n\n map.set(key, store);\n });\n\n return map;\n}\n"]}
1
+ {"version":3,"file":"getPropertiesStores.js","sourceRoot":"","sources":["../../../src/utils/getPropertiesStores.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAuB;IAEvB,MAAM,KAAK,GAAmB,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAEnF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QACtB,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACzC,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;QAE9B,MAAM,CAAC,OAAO,CAAC,CAAC,YAAY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OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAE7E,IAAI,GAAG,CAAC,aAAa,EAAE;QACrB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;KAC/C;IAED,IAAI,QAAQ,CAAC,MAAM,EAAE;QACnB,OAAO;YACL,GAAG,GAAG;YACN,QAAQ;SACT,CAAC;KACH;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import {uniq} from \"@tsed/core\";\nimport type {JsonSchema} from \"../domain/JsonSchema\";\nimport {alterRequiredGroups} from \"../hooks/alterRequiredGroups\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\n\nfunction applyStringRule(obj: any, propSchema: JsonSchema) {\n if (!propSchema?.$allow.includes(\"\")) {\n if (([] as string[]).concat(propSchema?.get(\"type\")).includes(\"string\")) {\n const minLength = obj?.minLength;\n // Disallow empty string\n if (minLength === undefined) {\n return {\n ...obj,\n minLength: 1\n };\n }\n }\n }\n\n return obj;\n}\n\nfunction mapRequiredProps(obj: any, schema: JsonSchema, options: JsonSchemaOptions = {}) {\n const {useAlias} = options;\n const props = Object.keys(obj.properties || {});\n\n return (keys: string[], key: string) => {\n const aliasedKey = useAlias ? (schema.alias.get(key) as string) || key : key;\n\n if (props.includes(aliasedKey)) {\n const propSchema = schema.get(\"properties\")[key];\n const serializeSchema = obj.properties[aliasedKey];\n\n obj.properties[aliasedKey] = applyStringRule(serializeSchema, propSchema);\n\n return keys.concat(aliasedKey);\n }\n\n return keys;\n };\n}\n\nfunction extractRequiredProps(obj: any, schema: JsonSchema, options: JsonSchemaOptions): string[] {\n let required: string[] = obj.required || [];\n\n required = [...required, ...schema.$required];\n\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]: [string, any]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n\n return required;\n }, required);\n }\n\n return alterRequiredGroups(uniq(required), schema, options);\n}\n\n/**\n * @ignore\n */\nexport function getRequiredProperties(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n if (options.groups && options.groups.includes(\"partial\")) {\n if (obj.discriminator) {\n return {\n ...obj,\n required: [obj.discriminator.propertyName]\n };\n }\n\n return obj;\n }\n\n let required = extractRequiredProps(obj, schema, options);\n\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n\n if (obj.discriminator) {\n required.push(obj.discriminator.propertyName);\n }\n\n if (required.length) {\n return {\n ...obj,\n required\n };\n }\n\n return obj;\n}\n"]}
1
+ {"version":3,"file":"getRequiredProperties.js","sourceRoot":"","sources":["../../../src/utils/getRequiredProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAEhC,OAAO,EAAC,mBAAmB,EAAC,MAAM,8BAA8B,CAAC;AAGjE,SAAS,eAAe,CAAC,GAAQ,EAAE,UAAsB;IACvD,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;QACpC,IAAK,EAAe,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACvE,MAAM,SAAS,GAAG,GAAG,EAAE,SAAS,CAAC;YACjC,wBAAwB;YACxB,IAAI,SAAS,KAAK,SAAS,EAAE;gBAC3B,OAAO;oBACL,GAAG,GAAG;oBACN,SAAS,EAAE,CAAC;iBACb,CAAC;aACH;SACF;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAQ,EAAE,MAAkB,EAAE,UAA6B,EAAE;IACrF,MAAM,EAAC,QAAQ,EAAC,GAAG,OAAO,CAAC;IAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;IAEhD,OAAO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AAM,EAAE;QAC/B,QAAQ,CAAC,UAAU,GAAG;YACpB,OAAO;SACR,CAAC;KACH;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,KAAmC,EAAE,UAAiC,EAAE;IAC9F,OAAO,GAAG;QACR,GAAG,OAAO;QACV,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,oBAAoB,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACtG,IAAI,EAAE,KAAK;KACZ,CAAC;IAEF,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;QAClB,IAAI,SAAS,GAAQ,EAAE,CAAC;QAExB,OAAO,GAAG;YACR,GAAG,OAAO;YACV,QAAQ,EAAE,SAAS,CAAC,OAAO;YAC3B,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,MAAM,CAAC,IAAS;gBACd,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YACzC,CAAC;SACF,CAAC;QAEF,KAAK,CAAC,OAAO,CAAC,CAAC,EAAC,KAAK,EAAE,GAAG,IAAI,EAAC,EAAE,EAAE;YACjC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE;gBAC1B,GAAG,OAAO;gBACV,GAAG,IAAI;aACR,CAAC,CAAC;YAEH,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import {cleanObject, isArray, Type, uniqBy} from \"@tsed/core\";\nimport {OpenSpec3} from \"@tsed/openspec\";\nimport {SpecTypes} from \"../domain/SpecTypes\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions\";\nimport {buildPath} from \"./buildPath\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore\";\nimport {getOperationsStores} from \"./getOperationsStores\";\nimport {mergeOperation} from \"./mergeOperation\";\nimport {operationIdFormatter} from \"./operationIdFormatter\";\nimport {mergeSpec} from \"./mergeSpec\";\n\nexport type JsonTokenOptions = ({token: Type<any>} & Partial<SpecSerializerOptions>)[];\n\nexport interface SpecSerializerOptions extends JsonSchemaOptions {\n /**\n * Paths\n */\n paths?: any;\n /**\n * Root path. This paths will be added to all generated paths Object.\n */\n rootPath?: string;\n /**\n * A function to generate the operationId.\n */\n operationIdFormatter?: (name: string, propertyKey: string, path: string) => string;\n /**\n * A pattern to generate the operationId.\n */\n operationIdPattern?: string;\n}\n\n/**\n * @ignore\n */\nconst caches: Map<Type<any>, Map<string, any>> = new Map();\n\n/**\n * @ignore\n */\nfunction get(model: Type<any>, options: any, cb: any) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n\n const cache = caches.get(model)!;\n const key = JSON.stringify(options);\n\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n\n return cache.get(key);\n}\n\nfunction generate(model: Type<any>, options: SpecSerializerOptions) {\n const store = getJsonEntityStore(model);\n const {schemas = {}, paths = {}, rootPath = \"/\", tags = []} = options;\n const specType = SpecTypes.OPENAPI;\n const ctrlPath = store.path;\n const defaultTags = cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n });\n\n const specJson: any = {paths};\n\n getOperationsStores(model).forEach((operationStore) => {\n if (operationStore.store.get(\"hidden\")) {\n return;\n }\n\n const operation = operationStore.operation!.toJSON({...options, specType, schemas});\n\n operationStore.operation!.operationPaths.forEach(({path, method}: {path: string; method: string}) => {\n if (method) {\n mergeOperation(specJson, operation, {\n rootPath: buildPath(rootPath + ctrlPath),\n path,\n method,\n defaultTags,\n tags,\n specType,\n operationId: (path: string) =>\n options.operationIdFormatter!(\n operationStore.parent.schema.get(\"name\") || operationStore.parent.targetName,\n operationStore.propertyName,\n path\n )\n });\n }\n });\n });\n\n specJson.tags = uniqBy(tags, \"name\");\n\n if (Object.keys(schemas).length) {\n specJson.components = {\n schemas\n };\n }\n\n return specJson;\n}\n\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model: Type<any> | JsonTokenOptions, options: SpecSerializerOptions = {}): Partial<OpenSpec3> {\n options = {\n ...options,\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false\n };\n\n if (isArray(model)) {\n let finalSpec: any = {};\n\n options = {\n ...options,\n specType: SpecTypes.OPENAPI,\n paths: {},\n tags: [],\n schemas: {},\n append(spec: any) {\n finalSpec = mergeSpec(finalSpec, spec);\n }\n };\n\n model.forEach(({token, ...opts}) => {\n const spec = getSpec(token, {\n ...options,\n ...opts\n });\n\n options.append(spec);\n });\n\n return finalSpec;\n }\n\n return get(model, options, () => generate(model, options));\n}\n"]}
1
+ {"version":3,"file":"getSpec.js","sourceRoot":"","sources":["../../../src/utils/getSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,OAAO,EAAQ,MAAM,EAAC,MAAM,YAAY,CAAC;AAE9D,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAuBtC;;GAEG;AACH,MAAM,MAAM,GAAqC,IAAI,GAAG,EAAE,CAAC;AAE3D;;GAEG;AACH,SAAS,GAAG,CAAC,KAAgB,EAAE,OAAY,EAAE,EAAO;IAClD,IA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