@tsed/schema 8.0.0-alpha.5 → 8.0.0-alpha.6

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 (547) hide show
  1. package/lib/browser/schema.umd.min.js.map +1 -1
  2. package/lib/esm/utils/getJsonSchema.js.map +1 -1
  3. package/lib/types/utils/getJsonSchema.d.ts +1 -1
  4. package/package.json +12 -12
  5. package/lib/cjs/components/async-api/channelsMapper.js +0 -62
  6. package/lib/cjs/components/async-api/channelsMapper.js.map +0 -1
  7. package/lib/cjs/components/async-api/generate.js +0 -20
  8. package/lib/cjs/components/async-api/generate.js.map +0 -1
  9. package/lib/cjs/components/async-api/messageMapper.js +0 -44
  10. package/lib/cjs/components/async-api/messageMapper.js.map +0 -1
  11. package/lib/cjs/components/async-api/payloadMapper.js +0 -52
  12. package/lib/cjs/components/async-api/payloadMapper.js.map +0 -1
  13. package/lib/cjs/components/async-api/responseMapper.js +0 -58
  14. package/lib/cjs/components/async-api/responseMapper.js.map +0 -1
  15. package/lib/cjs/components/default/anyMapper.js +0 -29
  16. package/lib/cjs/components/default/anyMapper.js.map +0 -1
  17. package/lib/cjs/components/default/classMapper.js +0 -43
  18. package/lib/cjs/components/default/classMapper.js.map +0 -1
  19. package/lib/cjs/components/default/genericsMapper.js +0 -62
  20. package/lib/cjs/components/default/genericsMapper.js.map +0 -1
  21. package/lib/cjs/components/default/inheritedClassMapper.js +0 -22
  22. package/lib/cjs/components/default/inheritedClassMapper.js.map +0 -1
  23. package/lib/cjs/components/default/inlineEnumsMapper.js +0 -16
  24. package/lib/cjs/components/default/inlineEnumsMapper.js.map +0 -1
  25. package/lib/cjs/components/default/itemMapper.js +0 -10
  26. package/lib/cjs/components/default/itemMapper.js.map +0 -1
  27. package/lib/cjs/components/default/lazyRefMapper.js +0 -18
  28. package/lib/cjs/components/default/lazyRefMapper.js.map +0 -1
  29. package/lib/cjs/components/default/mapMapper.js +0 -25
  30. package/lib/cjs/components/default/mapMapper.js.map +0 -1
  31. package/lib/cjs/components/default/nullableMapper.js +0 -54
  32. package/lib/cjs/components/default/nullableMapper.js.map +0 -1
  33. package/lib/cjs/components/default/objectMapper.js +0 -30
  34. package/lib/cjs/components/default/objectMapper.js.map +0 -1
  35. package/lib/cjs/components/default/ofMapper.js +0 -17
  36. package/lib/cjs/components/default/ofMapper.js.map +0 -1
  37. package/lib/cjs/components/default/propertiesMapper.js +0 -25
  38. package/lib/cjs/components/default/propertiesMapper.js.map +0 -1
  39. package/lib/cjs/components/default/requiredMapper.js +0 -56
  40. package/lib/cjs/components/default/requiredMapper.js.map +0 -1
  41. package/lib/cjs/components/default/schemaMapper.js +0 -124
  42. package/lib/cjs/components/default/schemaMapper.js.map +0 -1
  43. package/lib/cjs/components/index.js +0 -37
  44. package/lib/cjs/components/index.js.map +0 -1
  45. package/lib/cjs/components/open-spec/generate.js +0 -24
  46. package/lib/cjs/components/open-spec/generate.js.map +0 -1
  47. package/lib/cjs/components/open-spec/nullableMapper.js +0 -49
  48. package/lib/cjs/components/open-spec/nullableMapper.js.map +0 -1
  49. package/lib/cjs/components/open-spec/operationInFilesMapper.js +0 -28
  50. package/lib/cjs/components/open-spec/operationInFilesMapper.js.map +0 -1
  51. package/lib/cjs/components/open-spec/operationInParameterMapper.js +0 -39
  52. package/lib/cjs/components/open-spec/operationInParameterMapper.js.map +0 -1
  53. package/lib/cjs/components/open-spec/operationInParametersMapper.js +0 -10
  54. package/lib/cjs/components/open-spec/operationInParametersMapper.js.map +0 -1
  55. package/lib/cjs/components/open-spec/operationInQueryMapper.js +0 -61
  56. package/lib/cjs/components/open-spec/operationInQueryMapper.js.map +0 -1
  57. package/lib/cjs/components/open-spec/operationMapper.js +0 -49
  58. package/lib/cjs/components/open-spec/operationMapper.js.map +0 -1
  59. package/lib/cjs/components/open-spec/operationMediaMapper.js +0 -11
  60. package/lib/cjs/components/open-spec/operationMediaMapper.js.map +0 -1
  61. package/lib/cjs/components/open-spec/operationRequestBodyMapper.js +0 -67
  62. package/lib/cjs/components/open-spec/operationRequestBodyMapper.js.map +0 -1
  63. package/lib/cjs/components/open-spec/operationResponseMapper.js +0 -24
  64. package/lib/cjs/components/open-spec/operationResponseMapper.js.map +0 -1
  65. package/lib/cjs/components/open-spec/pathsMapper.js +0 -95
  66. package/lib/cjs/components/open-spec/pathsMapper.js.map +0 -1
  67. package/lib/cjs/constants/OperationVerbs.js +0 -32
  68. package/lib/cjs/constants/OperationVerbs.js.map +0 -1
  69. package/lib/cjs/constants/httpStatusMessages.js +0 -24
  70. package/lib/cjs/constants/httpStatusMessages.js.map +0 -1
  71. package/lib/cjs/constants/jsonSchemaProperties.js +0 -21
  72. package/lib/cjs/constants/jsonSchemaProperties.js.map +0 -1
  73. package/lib/cjs/decorators/class/children.js +0 -24
  74. package/lib/cjs/decorators/class/children.js.map +0 -1
  75. package/lib/cjs/decorators/class/discriminatorValue.js +0 -56
  76. package/lib/cjs/decorators/class/discriminatorValue.js.map +0 -1
  77. package/lib/cjs/decorators/collections/collectionContains.js +0 -29
  78. package/lib/cjs/decorators/collections/collectionContains.js.map +0 -1
  79. package/lib/cjs/decorators/collections/collectionOf.js +0 -102
  80. package/lib/cjs/decorators/collections/collectionOf.js.map +0 -1
  81. package/lib/cjs/decorators/collections/maxItems.js +0 -61
  82. package/lib/cjs/decorators/collections/maxItems.js.map +0 -1
  83. package/lib/cjs/decorators/collections/maxProperties.js +0 -84
  84. package/lib/cjs/decorators/collections/maxProperties.js.map +0 -1
  85. package/lib/cjs/decorators/collections/minItems.js +0 -65
  86. package/lib/cjs/decorators/collections/minItems.js.map +0 -1
  87. package/lib/cjs/decorators/collections/minProperties.js +0 -83
  88. package/lib/cjs/decorators/collections/minProperties.js.map +0 -1
  89. package/lib/cjs/decorators/collections/uniqueItems.js +0 -61
  90. package/lib/cjs/decorators/collections/uniqueItems.js.map +0 -1
  91. package/lib/cjs/decorators/common/additionalProperties.js +0 -20
  92. package/lib/cjs/decorators/common/additionalProperties.js.map +0 -1
  93. package/lib/cjs/decorators/common/allOf.js +0 -22
  94. package/lib/cjs/decorators/common/allOf.js.map +0 -1
  95. package/lib/cjs/decorators/common/allow.js +0 -47
  96. package/lib/cjs/decorators/common/allow.js.map +0 -1
  97. package/lib/cjs/decorators/common/any.js +0 -46
  98. package/lib/cjs/decorators/common/any.js.map +0 -1
  99. package/lib/cjs/decorators/common/anyOf.js +0 -26
  100. package/lib/cjs/decorators/common/anyOf.js.map +0 -1
  101. package/lib/cjs/decorators/common/const.js +0 -70
  102. package/lib/cjs/decorators/common/const.js.map +0 -1
  103. package/lib/cjs/decorators/common/customKey.js +0 -43
  104. package/lib/cjs/decorators/common/customKey.js.map +0 -1
  105. package/lib/cjs/decorators/common/default.js +0 -51
  106. package/lib/cjs/decorators/common/default.js.map +0 -1
  107. package/lib/cjs/decorators/common/defaultMsg.js +0 -41
  108. package/lib/cjs/decorators/common/defaultMsg.js.map +0 -1
  109. package/lib/cjs/decorators/common/description.js +0 -75
  110. package/lib/cjs/decorators/common/description.js.map +0 -1
  111. package/lib/cjs/decorators/common/discriminatorKey.js +0 -13
  112. package/lib/cjs/decorators/common/discriminatorKey.js.map +0 -1
  113. package/lib/cjs/decorators/common/enum.js +0 -109
  114. package/lib/cjs/decorators/common/enum.js.map +0 -1
  115. package/lib/cjs/decorators/common/errorMsg.js +0 -18
  116. package/lib/cjs/decorators/common/errorMsg.js.map +0 -1
  117. package/lib/cjs/decorators/common/example.js +0 -21
  118. package/lib/cjs/decorators/common/example.js.map +0 -1
  119. package/lib/cjs/decorators/common/examples.js +0 -21
  120. package/lib/cjs/decorators/common/examples.js.map +0 -1
  121. package/lib/cjs/decorators/common/exclusiveMaximum.js +0 -78
  122. package/lib/cjs/decorators/common/exclusiveMaximum.js.map +0 -1
  123. package/lib/cjs/decorators/common/exclusiveMinimum.js +0 -78
  124. package/lib/cjs/decorators/common/exclusiveMinimum.js.map +0 -1
  125. package/lib/cjs/decorators/common/format.js +0 -487
  126. package/lib/cjs/decorators/common/format.js.map +0 -1
  127. package/lib/cjs/decorators/common/forwardGroups.js +0 -20
  128. package/lib/cjs/decorators/common/forwardGroups.js.map +0 -1
  129. package/lib/cjs/decorators/common/groups.js +0 -49
  130. package/lib/cjs/decorators/common/groups.js.map +0 -1
  131. package/lib/cjs/decorators/common/hidden.js +0 -40
  132. package/lib/cjs/decorators/common/hidden.js.map +0 -1
  133. package/lib/cjs/decorators/common/ignore.js +0 -68
  134. package/lib/cjs/decorators/common/ignore.js.map +0 -1
  135. package/lib/cjs/decorators/common/integer.js +0 -71
  136. package/lib/cjs/decorators/common/integer.js.map +0 -1
  137. package/lib/cjs/decorators/common/jsonEntityFn.js +0 -32
  138. package/lib/cjs/decorators/common/jsonEntityFn.js.map +0 -1
  139. package/lib/cjs/decorators/common/maxLength.js +0 -90
  140. package/lib/cjs/decorators/common/maxLength.js.map +0 -1
  141. package/lib/cjs/decorators/common/maximum.js +0 -149
  142. package/lib/cjs/decorators/common/maximum.js.map +0 -1
  143. package/lib/cjs/decorators/common/minLength.js +0 -91
  144. package/lib/cjs/decorators/common/minLength.js.map +0 -1
  145. package/lib/cjs/decorators/common/minimum.js +0 -147
  146. package/lib/cjs/decorators/common/minimum.js.map +0 -1
  147. package/lib/cjs/decorators/common/multipleOf.js +0 -82
  148. package/lib/cjs/decorators/common/multipleOf.js.map +0 -1
  149. package/lib/cjs/decorators/common/name.js +0 -52
  150. package/lib/cjs/decorators/common/name.js.map +0 -1
  151. package/lib/cjs/decorators/common/nullable.js +0 -34
  152. package/lib/cjs/decorators/common/nullable.js.map +0 -1
  153. package/lib/cjs/decorators/common/oneOf.js +0 -27
  154. package/lib/cjs/decorators/common/oneOf.js.map +0 -1
  155. package/lib/cjs/decorators/common/optional.js +0 -28
  156. package/lib/cjs/decorators/common/optional.js.map +0 -1
  157. package/lib/cjs/decorators/common/pattern.js +0 -104
  158. package/lib/cjs/decorators/common/pattern.js.map +0 -1
  159. package/lib/cjs/decorators/common/property.js +0 -27
  160. package/lib/cjs/decorators/common/property.js.map +0 -1
  161. package/lib/cjs/decorators/common/readOnly.js +0 -21
  162. package/lib/cjs/decorators/common/readOnly.js.map +0 -1
  163. package/lib/cjs/decorators/common/recordOf.js +0 -63
  164. package/lib/cjs/decorators/common/recordOf.js.map +0 -1
  165. package/lib/cjs/decorators/common/required.js +0 -53
  166. package/lib/cjs/decorators/common/required.js.map +0 -1
  167. package/lib/cjs/decorators/common/requiredGroups.js +0 -26
  168. package/lib/cjs/decorators/common/requiredGroups.js.map +0 -1
  169. package/lib/cjs/decorators/common/schema.js +0 -66
  170. package/lib/cjs/decorators/common/schema.js.map +0 -1
  171. package/lib/cjs/decorators/common/title.js +0 -49
  172. package/lib/cjs/decorators/common/title.js.map +0 -1
  173. package/lib/cjs/decorators/common/typeError.js +0 -18
  174. package/lib/cjs/decorators/common/typeError.js.map +0 -1
  175. package/lib/cjs/decorators/common/writeOnly.js +0 -21
  176. package/lib/cjs/decorators/common/writeOnly.js.map +0 -1
  177. package/lib/cjs/decorators/config/jsonEntityComponent.js +0 -18
  178. package/lib/cjs/decorators/config/jsonEntityComponent.js.map +0 -1
  179. package/lib/cjs/decorators/generics/genericOf.js +0 -99
  180. package/lib/cjs/decorators/generics/genericOf.js.map +0 -1
  181. package/lib/cjs/decorators/generics/generics.js +0 -25
  182. package/lib/cjs/decorators/generics/generics.js.map +0 -1
  183. package/lib/cjs/decorators/operations/acceptMime.js +0 -28
  184. package/lib/cjs/decorators/operations/acceptMime.js.map +0 -1
  185. package/lib/cjs/decorators/operations/consumes.js +0 -39
  186. package/lib/cjs/decorators/operations/consumes.js.map +0 -1
  187. package/lib/cjs/decorators/operations/contentType.js +0 -28
  188. package/lib/cjs/decorators/operations/contentType.js.map +0 -1
  189. package/lib/cjs/decorators/operations/deprecated.js +0 -49
  190. package/lib/cjs/decorators/operations/deprecated.js.map +0 -1
  191. package/lib/cjs/decorators/operations/header.js +0 -63
  192. package/lib/cjs/decorators/operations/header.js.map +0 -1
  193. package/lib/cjs/decorators/operations/in.js +0 -80
  194. package/lib/cjs/decorators/operations/in.js.map +0 -1
  195. package/lib/cjs/decorators/operations/inFile.js +0 -45
  196. package/lib/cjs/decorators/operations/inFile.js.map +0 -1
  197. package/lib/cjs/decorators/operations/location.js +0 -29
  198. package/lib/cjs/decorators/operations/location.js.map +0 -1
  199. package/lib/cjs/decorators/operations/operation.js +0 -48
  200. package/lib/cjs/decorators/operations/operation.js.map +0 -1
  201. package/lib/cjs/decorators/operations/operationId.js +0 -24
  202. package/lib/cjs/decorators/operations/operationId.js.map +0 -1
  203. package/lib/cjs/decorators/operations/operationPath.js +0 -34
  204. package/lib/cjs/decorators/operations/operationPath.js.map +0 -1
  205. package/lib/cjs/decorators/operations/partial.js +0 -18
  206. package/lib/cjs/decorators/operations/partial.js.map +0 -1
  207. package/lib/cjs/decorators/operations/path.js +0 -29
  208. package/lib/cjs/decorators/operations/path.js.map +0 -1
  209. package/lib/cjs/decorators/operations/produces.js +0 -46
  210. package/lib/cjs/decorators/operations/produces.js.map +0 -1
  211. package/lib/cjs/decorators/operations/publish.js +0 -10
  212. package/lib/cjs/decorators/operations/publish.js.map +0 -1
  213. package/lib/cjs/decorators/operations/redirect.js +0 -25
  214. package/lib/cjs/decorators/operations/redirect.js.map +0 -1
  215. package/lib/cjs/decorators/operations/returns.js +0 -293
  216. package/lib/cjs/decorators/operations/returns.js.map +0 -1
  217. package/lib/cjs/decorators/operations/route.js +0 -158
  218. package/lib/cjs/decorators/operations/route.js.map +0 -1
  219. package/lib/cjs/decorators/operations/security.js +0 -31
  220. package/lib/cjs/decorators/operations/security.js.map +0 -1
  221. package/lib/cjs/decorators/operations/status.js +0 -133
  222. package/lib/cjs/decorators/operations/status.js.map +0 -1
  223. package/lib/cjs/decorators/operations/subscribe.js +0 -10
  224. package/lib/cjs/decorators/operations/subscribe.js.map +0 -1
  225. package/lib/cjs/decorators/operations/summary.js +0 -34
  226. package/lib/cjs/decorators/operations/summary.js.map +0 -1
  227. package/lib/cjs/decorators/operations/tags.js +0 -52
  228. package/lib/cjs/decorators/operations/tags.js.map +0 -1
  229. package/lib/cjs/decorators/operations/view.js +0 -31
  230. package/lib/cjs/decorators/operations/view.js.map +0 -1
  231. package/lib/cjs/domain/DecoratorContext.js +0 -88
  232. package/lib/cjs/domain/DecoratorContext.js.map +0 -1
  233. package/lib/cjs/domain/JsonAliasMap.js +0 -15
  234. package/lib/cjs/domain/JsonAliasMap.js.map +0 -1
  235. package/lib/cjs/domain/JsonClassStore.js +0 -37
  236. package/lib/cjs/domain/JsonClassStore.js.map +0 -1
  237. package/lib/cjs/domain/JsonDiscriminator.js +0 -38
  238. package/lib/cjs/domain/JsonDiscriminator.js.map +0 -1
  239. package/lib/cjs/domain/JsonEntityStore.js +0 -158
  240. package/lib/cjs/domain/JsonEntityStore.js.map +0 -1
  241. package/lib/cjs/domain/JsonFormatTypes.js +0 -22
  242. package/lib/cjs/domain/JsonFormatTypes.js.map +0 -1
  243. package/lib/cjs/domain/JsonLazyRef.js +0 -22
  244. package/lib/cjs/domain/JsonLazyRef.js.map +0 -1
  245. package/lib/cjs/domain/JsonMap.js +0 -29
  246. package/lib/cjs/domain/JsonMap.js.map +0 -1
  247. package/lib/cjs/domain/JsonMedia.js +0 -21
  248. package/lib/cjs/domain/JsonMedia.js.map +0 -1
  249. package/lib/cjs/domain/JsonMethodStore.js +0 -147
  250. package/lib/cjs/domain/JsonMethodStore.js.map +0 -1
  251. package/lib/cjs/domain/JsonOperation.js +0 -156
  252. package/lib/cjs/domain/JsonOperation.js.map +0 -1
  253. package/lib/cjs/domain/JsonOperationPathsMap.js +0 -19
  254. package/lib/cjs/domain/JsonOperationPathsMap.js.map +0 -1
  255. package/lib/cjs/domain/JsonOperationRoute.js +0 -54
  256. package/lib/cjs/domain/JsonOperationRoute.js.map +0 -1
  257. package/lib/cjs/domain/JsonParameter.js +0 -50
  258. package/lib/cjs/domain/JsonParameter.js.map +0 -1
  259. package/lib/cjs/domain/JsonParameterStore.js +0 -99
  260. package/lib/cjs/domain/JsonParameterStore.js.map +0 -1
  261. package/lib/cjs/domain/JsonParameterTypes.js +0 -27
  262. package/lib/cjs/domain/JsonParameterTypes.js.map +0 -1
  263. package/lib/cjs/domain/JsonPropertyStore.js +0 -80
  264. package/lib/cjs/domain/JsonPropertyStore.js.map +0 -1
  265. package/lib/cjs/domain/JsonRequestBody.js +0 -34
  266. package/lib/cjs/domain/JsonRequestBody.js.map +0 -1
  267. package/lib/cjs/domain/JsonResponse.js +0 -45
  268. package/lib/cjs/domain/JsonResponse.js.map +0 -1
  269. package/lib/cjs/domain/JsonSchema.js +0 -822
  270. package/lib/cjs/domain/JsonSchema.js.map +0 -1
  271. package/lib/cjs/domain/SpecTypes.js +0 -11
  272. package/lib/cjs/domain/SpecTypes.js.map +0 -1
  273. package/lib/cjs/hooks/alterIgnore.js +0 -24
  274. package/lib/cjs/hooks/alterIgnore.js.map +0 -1
  275. package/lib/cjs/hooks/alterOneOf.js +0 -50
  276. package/lib/cjs/hooks/alterOneOf.js.map +0 -1
  277. package/lib/cjs/hooks/alterRequiredGroups.js +0 -14
  278. package/lib/cjs/hooks/alterRequiredGroups.js.map +0 -1
  279. package/lib/cjs/index.js +0 -186
  280. package/lib/cjs/index.js.map +0 -1
  281. package/lib/cjs/interfaces/IgnoreCallback.js +0 -3
  282. package/lib/cjs/interfaces/IgnoreCallback.js.map +0 -1
  283. package/lib/cjs/interfaces/JsonHookContext.js +0 -3
  284. package/lib/cjs/interfaces/JsonHookContext.js.map +0 -1
  285. package/lib/cjs/interfaces/JsonOpenSpec.js +0 -3
  286. package/lib/cjs/interfaces/JsonOpenSpec.js.map +0 -1
  287. package/lib/cjs/interfaces/JsonSchemaOptions.js +0 -3
  288. package/lib/cjs/interfaces/JsonSchemaOptions.js.map +0 -1
  289. package/lib/cjs/package.json +0 -3
  290. package/lib/cjs/registries/JsonSchemaMapperContainer.js +0 -43
  291. package/lib/cjs/registries/JsonSchemaMapperContainer.js.map +0 -1
  292. package/lib/cjs/registries/enumRegistries.js +0 -5
  293. package/lib/cjs/registries/enumRegistries.js.map +0 -1
  294. package/lib/cjs/utils/buildPath.js +0 -13
  295. package/lib/cjs/utils/buildPath.js.map +0 -1
  296. package/lib/cjs/utils/concatParameters.js +0 -16
  297. package/lib/cjs/utils/concatParameters.js.map +0 -1
  298. package/lib/cjs/utils/concatPath.js +0 -23
  299. package/lib/cjs/utils/concatPath.js.map +0 -1
  300. package/lib/cjs/utils/defineStatusModel.js +0 -13
  301. package/lib/cjs/utils/defineStatusModel.js.map +0 -1
  302. package/lib/cjs/utils/from.js +0 -280
  303. package/lib/cjs/utils/from.js.map +0 -1
  304. package/lib/cjs/utils/generateSpec.js +0 -47
  305. package/lib/cjs/utils/generateSpec.js.map +0 -1
  306. package/lib/cjs/utils/generics.js +0 -40
  307. package/lib/cjs/utils/generics.js.map +0 -1
  308. package/lib/cjs/utils/getComputedType.js +0 -26
  309. package/lib/cjs/utils/getComputedType.js.map +0 -1
  310. package/lib/cjs/utils/getInheritedStores.js +0 -23
  311. package/lib/cjs/utils/getInheritedStores.js.map +0 -1
  312. package/lib/cjs/utils/getJsonEntityStore.js +0 -18
  313. package/lib/cjs/utils/getJsonEntityStore.js.map +0 -1
  314. package/lib/cjs/utils/getJsonPathParameters.js +0 -87
  315. package/lib/cjs/utils/getJsonPathParameters.js.map +0 -1
  316. package/lib/cjs/utils/getJsonSchema.js +0 -59
  317. package/lib/cjs/utils/getJsonSchema.js.map +0 -1
  318. package/lib/cjs/utils/getJsonType.js +0 -40
  319. package/lib/cjs/utils/getJsonType.js.map +0 -1
  320. package/lib/cjs/utils/getOperationsRoutes.js +0 -37
  321. package/lib/cjs/utils/getOperationsRoutes.js.map +0 -1
  322. package/lib/cjs/utils/getOperationsStores.js +0 -33
  323. package/lib/cjs/utils/getOperationsStores.js.map +0 -1
  324. package/lib/cjs/utils/getPropertiesStores.js +0 -45
  325. package/lib/cjs/utils/getPropertiesStores.js.map +0 -1
  326. package/lib/cjs/utils/getSpec.js +0 -79
  327. package/lib/cjs/utils/getSpec.js.map +0 -1
  328. package/lib/cjs/utils/getSpecType.js +0 -21
  329. package/lib/cjs/utils/getSpecType.js.map +0 -1
  330. package/lib/cjs/utils/isSuccessStatus.js +0 -8
  331. package/lib/cjs/utils/isSuccessStatus.js.map +0 -1
  332. package/lib/cjs/utils/mapHeaders.js +0 -29
  333. package/lib/cjs/utils/mapHeaders.js.map +0 -1
  334. package/lib/cjs/utils/mapOpenSpec.js +0 -41
  335. package/lib/cjs/utils/mapOpenSpec.js.map +0 -1
  336. package/lib/cjs/utils/mapOpenSpec2.js +0 -34
  337. package/lib/cjs/utils/mapOpenSpec2.js.map +0 -1
  338. package/lib/cjs/utils/mapOpenSpec3.js +0 -26
  339. package/lib/cjs/utils/mapOpenSpec3.js.map +0 -1
  340. package/lib/cjs/utils/mapOpenSpecInfo.js +0 -21
  341. package/lib/cjs/utils/mapOpenSpecInfo.js.map +0 -1
  342. package/lib/cjs/utils/mapOperationOptions.js +0 -31
  343. package/lib/cjs/utils/mapOperationOptions.js.map +0 -1
  344. package/lib/cjs/utils/matchGroups.js +0 -56
  345. package/lib/cjs/utils/matchGroups.js.map +0 -1
  346. package/lib/cjs/utils/mergeSpec.js +0 -51
  347. package/lib/cjs/utils/mergeSpec.js.map +0 -1
  348. package/lib/cjs/utils/operationIdFormatter.js +0 -41
  349. package/lib/cjs/utils/operationIdFormatter.js.map +0 -1
  350. package/lib/cjs/utils/ref.js +0 -55
  351. package/lib/cjs/utils/ref.js.map +0 -1
  352. package/lib/cjs/utils/removeHiddenOperation.js +0 -8
  353. package/lib/cjs/utils/removeHiddenOperation.js.map +0 -1
  354. package/lib/cjs/utils/serializeEnumValues.js +0 -26
  355. package/lib/cjs/utils/serializeEnumValues.js.map +0 -1
  356. package/lib/cjs/utils/somethingOf.js +0 -16
  357. package/lib/cjs/utils/somethingOf.js.map +0 -1
  358. package/lib/cjs/utils/toJsonMapCollection.js +0 -15
  359. package/lib/cjs/utils/toJsonMapCollection.js.map +0 -1
  360. package/lib/cjs/utils/toJsonRegex.js +0 -12
  361. package/lib/cjs/utils/toJsonRegex.js.map +0 -1
  362. package/lib/cjs/utils/transformToOS2.js +0 -509
  363. package/lib/cjs/utils/transformToOS2.js.map +0 -1
  364. package/lib/cjs/utils/withErrorMsg.js +0 -34
  365. package/lib/cjs/utils/withErrorMsg.js.map +0 -1
  366. package/lib/esm/package.json +0 -3
  367. package/lib/types-esm/components/async-api/channelsMapper.d.ts +0 -2
  368. package/lib/types-esm/components/async-api/generate.d.ts +0 -1
  369. package/lib/types-esm/components/async-api/messageMapper.d.ts +0 -6
  370. package/lib/types-esm/components/async-api/payloadMapper.d.ts +0 -4
  371. package/lib/types-esm/components/async-api/responseMapper.d.ts +0 -6
  372. package/lib/types-esm/components/default/anyMapper.d.ts +0 -2
  373. package/lib/types-esm/components/default/classMapper.d.ts +0 -3
  374. package/lib/types-esm/components/default/genericsMapper.d.ts +0 -5
  375. package/lib/types-esm/components/default/inheritedClassMapper.d.ts +0 -5
  376. package/lib/types-esm/components/default/inlineEnumsMapper.d.ts +0 -3
  377. package/lib/types-esm/components/default/itemMapper.d.ts +0 -2
  378. package/lib/types-esm/components/default/lazyRefMapper.d.ts +0 -3
  379. package/lib/types-esm/components/default/mapMapper.d.ts +0 -9
  380. package/lib/types-esm/components/default/nullableMapper.d.ts +0 -2
  381. package/lib/types-esm/components/default/objectMapper.d.ts +0 -8
  382. package/lib/types-esm/components/default/ofMapper.d.ts +0 -3
  383. package/lib/types-esm/components/default/propertiesMapper.d.ts +0 -3
  384. package/lib/types-esm/components/default/requiredMapper.d.ts +0 -3
  385. package/lib/types-esm/components/default/schemaMapper.d.ts +0 -3
  386. package/lib/types-esm/components/index.d.ts +0 -33
  387. package/lib/types-esm/components/open-spec/generate.d.ts +0 -1
  388. package/lib/types-esm/components/open-spec/nullableMapper.d.ts +0 -2
  389. package/lib/types-esm/components/open-spec/operationInFilesMapper.d.ts +0 -2
  390. package/lib/types-esm/components/open-spec/operationInParameterMapper.d.ts +0 -10
  391. package/lib/types-esm/components/open-spec/operationInParametersMapper.d.ts +0 -3
  392. package/lib/types-esm/components/open-spec/operationInQueryMapper.d.ts +0 -2
  393. package/lib/types-esm/components/open-spec/operationMapper.d.ts +0 -3
  394. package/lib/types-esm/components/open-spec/operationMediaMapper.d.ts +0 -3
  395. package/lib/types-esm/components/open-spec/operationRequestBodyMapper.d.ts +0 -3
  396. package/lib/types-esm/components/open-spec/operationResponseMapper.d.ts +0 -3
  397. package/lib/types-esm/components/open-spec/pathsMapper.d.ts +0 -2
  398. package/lib/types-esm/constants/OperationVerbs.d.ts +0 -16
  399. package/lib/types-esm/constants/httpStatusMessages.d.ts +0 -11
  400. package/lib/types-esm/constants/jsonSchemaProperties.d.ts +0 -7
  401. package/lib/types-esm/decorators/class/children.d.ts +0 -11
  402. package/lib/types-esm/decorators/class/discriminatorValue.d.ts +0 -42
  403. package/lib/types-esm/decorators/collections/collectionContains.d.ts +0 -21
  404. package/lib/types-esm/decorators/collections/collectionOf.d.ts +0 -101
  405. package/lib/types-esm/decorators/collections/maxItems.d.ts +0 -48
  406. package/lib/types-esm/decorators/collections/maxProperties.d.ts +0 -71
  407. package/lib/types-esm/decorators/collections/minItems.d.ts +0 -52
  408. package/lib/types-esm/decorators/collections/minProperties.d.ts +0 -70
  409. package/lib/types-esm/decorators/collections/uniqueItems.d.ts +0 -51
  410. package/lib/types-esm/decorators/common/additionalProperties.d.ts +0 -11
  411. package/lib/types-esm/decorators/common/allOf.d.ts +0 -13
  412. package/lib/types-esm/decorators/common/allow.d.ts +0 -28
  413. package/lib/types-esm/decorators/common/any.d.ts +0 -38
  414. package/lib/types-esm/decorators/common/anyOf.d.ts +0 -17
  415. package/lib/types-esm/decorators/common/const.d.ts +0 -61
  416. package/lib/types-esm/decorators/common/customKey.d.ts +0 -26
  417. package/lib/types-esm/decorators/common/default.d.ts +0 -41
  418. package/lib/types-esm/decorators/common/defaultMsg.d.ts +0 -32
  419. package/lib/types-esm/decorators/common/description.d.ts +0 -53
  420. package/lib/types-esm/decorators/common/discriminatorKey.d.ts +0 -1
  421. package/lib/types-esm/decorators/common/enum.d.ts +0 -101
  422. package/lib/types-esm/decorators/common/errorMsg.d.ts +0 -6
  423. package/lib/types-esm/decorators/common/example.d.ts +0 -11
  424. package/lib/types-esm/decorators/common/examples.d.ts +0 -12
  425. package/lib/types-esm/decorators/common/exclusiveMaximum.d.ts +0 -70
  426. package/lib/types-esm/decorators/common/exclusiveMinimum.d.ts +0 -70
  427. package/lib/types-esm/decorators/common/format.d.ts +0 -466
  428. package/lib/types-esm/decorators/common/forwardGroups.d.ts +0 -10
  429. package/lib/types-esm/decorators/common/groups.d.ts +0 -12
  430. package/lib/types-esm/decorators/common/hidden.d.ts +0 -32
  431. package/lib/types-esm/decorators/common/ignore.d.ts +0 -59
  432. package/lib/types-esm/decorators/common/integer.d.ts +0 -61
  433. package/lib/types-esm/decorators/common/jsonEntityFn.d.ts +0 -21
  434. package/lib/types-esm/decorators/common/maxLength.d.ts +0 -77
  435. package/lib/types-esm/decorators/common/maximum.d.ts +0 -139
  436. package/lib/types-esm/decorators/common/minLength.d.ts +0 -78
  437. package/lib/types-esm/decorators/common/minimum.d.ts +0 -137
  438. package/lib/types-esm/decorators/common/multipleOf.d.ts +0 -69
  439. package/lib/types-esm/decorators/common/name.d.ts +0 -32
  440. package/lib/types-esm/decorators/common/nullable.d.ts +0 -25
  441. package/lib/types-esm/decorators/common/oneOf.d.ts +0 -17
  442. package/lib/types-esm/decorators/common/optional.d.ts +0 -10
  443. package/lib/types-esm/decorators/common/pattern.d.ts +0 -94
  444. package/lib/types-esm/decorators/common/property.d.ts +0 -11
  445. package/lib/types-esm/decorators/common/readOnly.d.ts +0 -11
  446. package/lib/types-esm/decorators/common/recordOf.d.ts +0 -46
  447. package/lib/types-esm/decorators/common/required.d.ts +0 -44
  448. package/lib/types-esm/decorators/common/requiredGroups.d.ts +0 -10
  449. package/lib/types-esm/decorators/common/schema.d.ts +0 -53
  450. package/lib/types-esm/decorators/common/title.d.ts +0 -39
  451. package/lib/types-esm/decorators/common/typeError.d.ts +0 -8
  452. package/lib/types-esm/decorators/common/writeOnly.d.ts +0 -11
  453. package/lib/types-esm/decorators/config/jsonEntityComponent.d.ts +0 -10
  454. package/lib/types-esm/decorators/generics/genericOf.d.ts +0 -76
  455. package/lib/types-esm/decorators/generics/generics.d.ts +0 -14
  456. package/lib/types-esm/decorators/operations/acceptMime.d.ts +0 -19
  457. package/lib/types-esm/decorators/operations/consumes.d.ts +0 -19
  458. package/lib/types-esm/decorators/operations/contentType.d.ts +0 -20
  459. package/lib/types-esm/decorators/operations/deprecated.d.ts +0 -23
  460. package/lib/types-esm/decorators/operations/header.d.ts +0 -49
  461. package/lib/types-esm/decorators/operations/in.d.ts +0 -64
  462. package/lib/types-esm/decorators/operations/inFile.d.ts +0 -25
  463. package/lib/types-esm/decorators/operations/location.d.ts +0 -22
  464. package/lib/types-esm/decorators/operations/operation.d.ts +0 -60
  465. package/lib/types-esm/decorators/operations/operationId.d.ts +0 -10
  466. package/lib/types-esm/decorators/operations/operationPath.d.ts +0 -21
  467. package/lib/types-esm/decorators/operations/partial.d.ts +0 -10
  468. package/lib/types-esm/decorators/operations/path.d.ts +0 -15
  469. package/lib/types-esm/decorators/operations/produces.d.ts +0 -26
  470. package/lib/types-esm/decorators/operations/publish.d.ts +0 -1
  471. package/lib/types-esm/decorators/operations/redirect.d.ts +0 -52
  472. package/lib/types-esm/decorators/operations/returns.d.ts +0 -267
  473. package/lib/types-esm/decorators/operations/route.d.ts +0 -128
  474. package/lib/types-esm/decorators/operations/security.d.ts +0 -56
  475. package/lib/types-esm/decorators/operations/status.d.ts +0 -127
  476. package/lib/types-esm/decorators/operations/subscribe.d.ts +0 -1
  477. package/lib/types-esm/decorators/operations/summary.d.ts +0 -20
  478. package/lib/types-esm/decorators/operations/tags.d.ts +0 -23
  479. package/lib/types-esm/decorators/operations/view.d.ts +0 -23
  480. package/lib/types-esm/domain/DecoratorContext.d.ts +0 -28
  481. package/lib/types-esm/domain/JsonAliasMap.d.ts +0 -12
  482. package/lib/types-esm/domain/JsonClassStore.d.ts +0 -12
  483. package/lib/types-esm/domain/JsonDiscriminator.d.ts +0 -18
  484. package/lib/types-esm/domain/JsonEntityStore.d.ts +0 -110
  485. package/lib/types-esm/domain/JsonFormatTypes.d.ts +0 -17
  486. package/lib/types-esm/domain/JsonLazyRef.d.ts +0 -9
  487. package/lib/types-esm/domain/JsonMap.d.ts +0 -9
  488. package/lib/types-esm/domain/JsonMedia.d.ts +0 -11
  489. package/lib/types-esm/domain/JsonMethodStore.d.ts +0 -92
  490. package/lib/types-esm/domain/JsonOperation.d.ts +0 -51
  491. package/lib/types-esm/domain/JsonOperationPathsMap.d.ts +0 -7
  492. package/lib/types-esm/domain/JsonOperationRoute.d.ts +0 -25
  493. package/lib/types-esm/domain/JsonParameter.d.ts +0 -22
  494. package/lib/types-esm/domain/JsonParameterStore.d.ts +0 -52
  495. package/lib/types-esm/domain/JsonParameterTypes.d.ts +0 -16
  496. package/lib/types-esm/domain/JsonPropertyStore.d.ts +0 -32
  497. package/lib/types-esm/domain/JsonRequestBody.d.ts +0 -12
  498. package/lib/types-esm/domain/JsonResponse.d.ts +0 -18
  499. package/lib/types-esm/domain/JsonSchema.d.ts +0 -340
  500. package/lib/types-esm/domain/SpecTypes.d.ts +0 -6
  501. package/lib/types-esm/hooks/alterIgnore.d.ts +0 -10
  502. package/lib/types-esm/hooks/alterOneOf.d.ts +0 -3
  503. package/lib/types-esm/hooks/alterRequiredGroups.d.ts +0 -6
  504. package/lib/types-esm/index.d.ts +0 -182
  505. package/lib/types-esm/interfaces/IgnoreCallback.d.ts +0 -4
  506. package/lib/types-esm/interfaces/JsonHookContext.d.ts +0 -17
  507. package/lib/types-esm/interfaces/JsonOpenSpec.d.ts +0 -9
  508. package/lib/types-esm/interfaces/JsonSchemaOptions.d.ts +0 -30
  509. package/lib/types-esm/registries/JsonSchemaMapperContainer.d.ts +0 -21
  510. package/lib/types-esm/registries/enumRegistries.d.ts +0 -2
  511. package/lib/types-esm/utils/buildPath.d.ts +0 -6
  512. package/lib/types-esm/utils/concatParameters.d.ts +0 -4
  513. package/lib/types-esm/utils/concatPath.d.ts +0 -1
  514. package/lib/types-esm/utils/defineStatusModel.d.ts +0 -3
  515. package/lib/types-esm/utils/from.d.ts +0 -190
  516. package/lib/types-esm/utils/generateSpec.d.ts +0 -16
  517. package/lib/types-esm/utils/generics.d.ts +0 -50
  518. package/lib/types-esm/utils/getComputedType.d.ts +0 -5
  519. package/lib/types-esm/utils/getInheritedStores.d.ts +0 -8
  520. package/lib/types-esm/utils/getJsonEntityStore.d.ts +0 -15
  521. package/lib/types-esm/utils/getJsonPathParameters.d.ts +0 -7
  522. package/lib/types-esm/utils/getJsonSchema.d.ts +0 -4
  523. package/lib/types-esm/utils/getJsonType.d.ts +0 -5
  524. package/lib/types-esm/utils/getOperationsRoutes.d.ts +0 -10
  525. package/lib/types-esm/utils/getOperationsStores.d.ts +0 -6
  526. package/lib/types-esm/utils/getPropertiesStores.d.ts +0 -20
  527. package/lib/types-esm/utils/getSpec.d.ts +0 -34
  528. package/lib/types-esm/utils/getSpecType.d.ts +0 -12
  529. package/lib/types-esm/utils/isSuccessStatus.d.ts +0 -2
  530. package/lib/types-esm/utils/mapHeaders.d.ts +0 -9
  531. package/lib/types-esm/utils/mapOpenSpec.d.ts +0 -10
  532. package/lib/types-esm/utils/mapOpenSpec2.d.ts +0 -9
  533. package/lib/types-esm/utils/mapOpenSpec3.d.ts +0 -8
  534. package/lib/types-esm/utils/mapOpenSpecInfo.d.ts +0 -6
  535. package/lib/types-esm/utils/mapOperationOptions.d.ts +0 -5
  536. package/lib/types-esm/utils/matchGroups.d.ts +0 -4
  537. package/lib/types-esm/utils/mergeSpec.d.ts +0 -23
  538. package/lib/types-esm/utils/operationIdFormatter.d.ts +0 -6
  539. package/lib/types-esm/utils/ref.d.ts +0 -14
  540. package/lib/types-esm/utils/removeHiddenOperation.d.ts +0 -2
  541. package/lib/types-esm/utils/serializeEnumValues.d.ts +0 -5
  542. package/lib/types-esm/utils/somethingOf.d.ts +0 -1
  543. package/lib/types-esm/utils/toJsonMapCollection.d.ts +0 -7
  544. package/lib/types-esm/utils/toJsonRegex.d.ts +0 -5
  545. package/lib/types-esm/utils/transformToOS2.d.ts +0 -25
  546. package/lib/types-esm/utils/withErrorMsg.d.ts +0 -6
  547. /package/{webpack.config.js → webpack.config.cjs} +0 -0
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.operationMapper = void 0;
4
- const httpStatusMessages_js_1 = require("../../constants/httpStatusMessages.js");
5
- const JsonParameterTypes_js_1 = require("../../domain/JsonParameterTypes.js");
6
- const JsonSchemaMapperContainer_js_1 = require("../../registries/JsonSchemaMapperContainer.js");
7
- function extractParameters(jsonOperation, options) {
8
- return jsonOperation
9
- .get("parameters")
10
- .filter((parameter) => (0, JsonParameterTypes_js_1.isParameterType)(parameter.get("in")))
11
- .reduce((inputs, parameter) => {
12
- const [parameters, bodyParameters] = inputs;
13
- if ([JsonParameterTypes_js_1.JsonParameterTypes.BODY, JsonParameterTypes_js_1.JsonParameterTypes.FILES].includes(parameter.get("in"))) {
14
- return [parameters, [...bodyParameters, parameter]];
15
- }
16
- return [[...parameters, parameter], bodyParameters];
17
- }, [[], []]);
18
- }
19
- function operationMapper(jsonOperation, { tags = [], defaultTags = [], ...options } = {}) {
20
- const { consumes, produces, ...operation } = (0, JsonSchemaMapperContainer_js_1.execMapper)("map", [jsonOperation], { ...options, ignore: ["parameters"] });
21
- if (operation.security) {
22
- operation.security = [].concat(operation.security);
23
- }
24
- if (jsonOperation.get("responses").size === 0) {
25
- operation.responses = {
26
- "200": {
27
- description: (0, httpStatusMessages_js_1.getStatusMessage)(200)
28
- }
29
- };
30
- }
31
- const parametersOptions = {
32
- ...options,
33
- consumes: jsonOperation.get("consumes")?.length ? jsonOperation.get("consumes") : ["application/json"]
34
- };
35
- const [parameters, bodyParameters] = extractParameters(jsonOperation, parametersOptions);
36
- operation.parameters = (0, JsonSchemaMapperContainer_js_1.execMapper)("operationInParameters", [parameters], options);
37
- if (bodyParameters.length) {
38
- operation.requestBody = (0, JsonSchemaMapperContainer_js_1.execMapper)("operationRequestBody", [bodyParameters], parametersOptions);
39
- }
40
- const operationTags = operation.tags?.length ? operation.tags : defaultTags;
41
- if (operationTags.length) {
42
- operation.tags = operationTags.map(({ name }) => name);
43
- }
44
- tags.push(...operationTags);
45
- return operation;
46
- }
47
- exports.operationMapper = operationMapper;
48
- (0, JsonSchemaMapperContainer_js_1.registerJsonSchemaMapper)("operation", operationMapper);
49
- //# sourceMappingURL=operationMapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operationMapper.js","sourceRoot":"","sources":["../../../../src/components/open-spec/operationMapper.ts"],"names":[],"mappings":";;;AAAA,iFAAuE;AAGvE,8EAAuF;AAEvF,gGAAmG;AAEnG,SAAS,iBAAiB,CAAC,aAA4B,EAAE,OAA0B;IACjF,OAAO,aAAa;SACjB,GAAG,CAAC,YAAY,CAAC;SACjB,MAAM,CAAC,CAAC,SAAwB,EAAE,EAAE,CAAC,IAAA,uCAAe,EAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;SAC1E,MAAM,CACL,CAAC,MAAgC,EAAE,SAAwB,EAAE,EAAE;QAC7D,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,MAAM,CAAC;QAE5C,IAAI,CAAC,0CAAkB,CAAC,IAAI,EAAE,0CAAkB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE;YACrF,OAAO,CAAC,UAAU,EAAE,CAAC,GAAG,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;SACrD;QAED,OAAO,CAAC,CAAC,GAAG,UAAU,EAAE,SAAS,CAAC,EAAE,cAAc,CAA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AAE,CAAC,cAAc,CAAC,EAAE,iBAAiB,CAAC,CAAC;KACjG;IAED,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAE5E,IAAI,aAAa,CAAC,MAAM,EAAE;QACxB,SAAS,CAAC,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAM,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;KAC3D;IAED,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;IAE5B,OAAO,SAAS,CAAC;AACnB,CAAC;AArCD,0CAqCC;AAED,IAAA,uDAAwB,EAAC,WAAW,EAAE,eAAe,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.operationMediaMapper = void 0;
4
- const JsonSchemaMapperContainer_js_1 = require("../../registries/JsonSchemaMapperContainer.js");
5
- function operationMediaMapper(jsonMedia, options) {
6
- let groups = [...(jsonMedia.groups || [])];
7
- return (0, JsonSchemaMapperContainer_js_1.execMapper)("map", [jsonMedia], { ...options, groups, groupsName: jsonMedia.groupsName });
8
- }
9
- exports.operationMediaMapper = operationMediaMapper;
10
- (0, JsonSchemaMapperContainer_js_1.registerJsonSchemaMapper)("operationMedia", operationMediaMapper);
11
- //# sourceMappingURL=operationMediaMapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operationMediaMapper.js","sourceRoot":"","sources":["../../../../src/components/open-spec/operationMediaMapper.ts"],"names":[],"mappings":";;;AAEA,gGAAmG;AAEnG,SAAgB,oBAAoB,CAAC,SAAoB,EAAE,OAA0B;IACnF,IAAI,MAAM,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAE3C,OAAO,IAAA,yCAAU,EAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,EAAC,GAAG,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,UAAU,EAAC,CAAC,CAAC;AAChG,CAAC;AAJD,oDAIC;AAED,IAAA,uDAAwB,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC"}
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.operationRequestBodyMapper = void 0;
4
- const JsonRequestBody_js_1 = require("../../domain/JsonRequestBody.js");
5
- const JsonSchema_js_1 = require("../../domain/JsonSchema.js");
6
- const JsonSchemaMapperContainer_js_1 = require("../../registries/JsonSchemaMapperContainer.js");
7
- function buildSchemaFromBodyParameters(parameters, options) {
8
- let schema = new JsonSchema_js_1.JsonSchema();
9
- const props = {};
10
- const refs = [];
11
- let propsLength = 0;
12
- const hasFile = parameters.some((param) => param.get("in") === "files");
13
- parameters.forEach((parameter) => {
14
- const name = parameter.getName();
15
- [...parameter.entries()]
16
- .filter(([key]) => !["in", "name"].includes(key))
17
- .forEach(([key, value]) => {
18
- if (props[key] === undefined) {
19
- props[key] = value;
20
- }
21
- });
22
- const jsonParameter = (0, JsonSchemaMapperContainer_js_1.execMapper)("operationInParameter", [parameter], options);
23
- if (name) {
24
- const propSchema = {
25
- ...(jsonParameter.schema || {
26
- type: jsonParameter.type
27
- })
28
- };
29
- if (hasFile && jsonParameter.description) {
30
- propSchema.description = jsonParameter.description;
31
- }
32
- schema.addProperty(name, propSchema);
33
- if (parameter.get("required")) {
34
- schema.addRequired(name);
35
- }
36
- propsLength++;
37
- }
38
- else {
39
- refs.push(jsonParameter);
40
- }
41
- });
42
- if (!propsLength) {
43
- if (refs.length === 1) {
44
- return refs[0];
45
- }
46
- }
47
- schema.type("object");
48
- if (props.description && hasFile) {
49
- delete props.description;
50
- }
51
- return {
52
- schema: schema.toJSON(options),
53
- required: false,
54
- ...props
55
- };
56
- }
57
- function operationRequestBodyMapper(bodyParameters, { consumes, ...options }) {
58
- const { schema, examples, in: _, ...props } = buildSchemaFromBodyParameters(bodyParameters, options);
59
- const requestBody = new JsonRequestBody_js_1.JsonRequestBody(props);
60
- consumes.forEach((consume) => {
61
- requestBody.addContent(consume, schema, examples);
62
- });
63
- return (0, JsonSchemaMapperContainer_js_1.execMapper)("map", [requestBody], options);
64
- }
65
- exports.operationRequestBodyMapper = operationRequestBodyMapper;
66
- (0, JsonSchemaMapperContainer_js_1.registerJsonSchemaMapper)("operationRequestBody", operationRequestBodyMapper);
67
- //# sourceMappingURL=operationRequestBodyMapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operationRequestBodyMapper.js","sourceRoot":"","sources":["../../../../src/components/open-spec/operationRequestBodyMapper.ts"],"names":[],"mappings":";;;AACA,wEAAgE;AAChE,8DAAsD;AAEtD,gGAAmG;AAEnG,SAAS,6BAA6B,CAAC,UAA2B,EAAE,OAA0B;IAC5F,IAAI,MAAM,GAAG,IAAI,0BAAU,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAQ,EAAE,CAAC;IACtB,MAAM,IAAI,GAAiB,EAAE,CAAC;IAC9B,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC;IAExE,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;QAEjC,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;aACrB,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;aAChD,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACxB,IAAI,KAAK,C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EAAoB;IACnH,MAAM,EAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,EAAC,GAAG,6BAA6B,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAEnG,MAAM,WAAW,GAAG,IAAI,oCAAe,CAAC,KAAK,CAAC,CAAC;IAE/C,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAe,EAAE,EAAE;QACnC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,yCAAU,EAAC,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC;AAVD,gEAUC;AAED,IAAA,uDAAwB,EAAC,sBAAsB,EAAE,0BAA0B,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.operationResponseMapper = void 0;
4
- const JsonSchemaMapperContainer_js_1 = require("../../registries/JsonSchemaMapperContainer.js");
5
- function operationResponseMapper(jsonResponse, options = {}) {
6
- const response = (0, JsonSchemaMapperContainer_js_1.execMapper)("map", [jsonResponse], options);
7
- if (jsonResponse.status === 204) {
8
- delete response.content;
9
- }
10
- if (response.headers) {
11
- Object.entries(response.headers).forEach(([key, { type, ...props }]) => {
12
- response.headers[key] = {
13
- ...props,
14
- schema: {
15
- type
16
- }
17
- };
18
- });
19
- }
20
- return response;
21
- }
22
- exports.operationResponseMapper = operationResponseMapper;
23
- (0, JsonSchemaMapperContainer_js_1.registerJsonSchemaMapper)("operationResponse", operationResponseMapper);
24
- //# sourceMappingURL=operationResponseMapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operationResponseMapper.js","sourceRoot":"","sources":["../../../../src/components/open-spec/operationResponseMapper.ts"],"names":[],"mappings":";;;AAEA,gGAAmG;AAEnG,SAAgB,uBAAuB,CAAC,YAA0B,EAAE,UAA6B,EAAE;IACjG,MAAM,QAAQ,GAAG,IAAA,yCAAU,EAAC,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;IAE5D,IAAI,YAAY,CAAC,MAAM,KAAK,GAAG,EAAE;QAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC;KACzB;IAED,IAAI,QAAQ,CAAC,OAAO,EAAE;QACpB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,EAAC,IAAI,EAAE,GAAG,KAAK,EAAC,CAAgB,EAAE,EAAE;YAClF,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG;gBACtB,GAAG,KAAK;gBACR,MAAM,EAAE;oBACN,IAAI;iBACL;aACF,CAAC;QACJ,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAnBD,0DAmBC;AAED,IAAA,uDAAwB,EAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC"}
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pathsMapper = void 0;
4
- const OperationVerbs_js_1 = require("../../constants/OperationVerbs.js");
5
- const JsonSchemaMapperContainer_js_1 = require("../../registries/JsonSchemaMapperContainer.js");
6
- const buildPath_js_1 = require("../../utils/buildPath.js");
7
- const concatParameters_js_1 = require("../../utils/concatParameters.js");
8
- const getJsonEntityStore_js_1 = require("../../utils/getJsonEntityStore.js");
9
- const getJsonPathParameters_js_1 = require("../../utils/getJsonPathParameters.js");
10
- const getOperationsStores_js_1 = require("../../utils/getOperationsStores.js");
11
- const operationIdFormatter_js_1 = require("../../utils/operationIdFormatter.js");
12
- const removeHiddenOperation_js_1 = require("../../utils/removeHiddenOperation.js");
13
- const ALLOWED_VERBS = [
14
- OperationVerbs_js_1.OperationVerbs.ALL,
15
- OperationVerbs_js_1.OperationVerbs.GET,
16
- OperationVerbs_js_1.OperationVerbs.POST,
17
- OperationVerbs_js_1.OperationVerbs.PUT,
18
- OperationVerbs_js_1.OperationVerbs.PATCH,
19
- OperationVerbs_js_1.OperationVerbs.HEAD,
20
- OperationVerbs_js_1.OperationVerbs.OPTIONS,
21
- OperationVerbs_js_1.OperationVerbs.DELETE,
22
- OperationVerbs_js_1.OperationVerbs.TRACE
23
- ];
24
- function pushToPath(paths, { path, method, operation }) {
25
- return {
26
- ...paths,
27
- [path]: {
28
- ...paths[path],
29
- [method.toLowerCase()]: operation
30
- }
31
- };
32
- }
33
- function mapOperationInPathParameters(options) {
34
- return ({ operationPath, operation, operationStore }) => {
35
- const { path, method } = operationPath;
36
- return (0, getJsonPathParameters_js_1.getJsonPathParameters)(options.ctrlRootPath, path).map(({ path, parameters }) => {
37
- path = path ? path : "/";
38
- parameters = (0, concatParameters_js_1.concatParameters)(parameters.map(({ type, ...param }) => {
39
- return {
40
- ...param,
41
- schema: {
42
- type
43
- }
44
- };
45
- }), operation);
46
- return {
47
- operation: {
48
- ...operation,
49
- parameters,
50
- operationId: operation.operationId ||
51
- (0, operationIdFormatter_js_1.getOperationId)(path, {
52
- ...options,
53
- store: operationStore
54
- })
55
- },
56
- method,
57
- path
58
- };
59
- });
60
- };
61
- }
62
- function mapOperation(options) {
63
- return (operationStore) => {
64
- const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);
65
- if (operationPaths.length === 0) {
66
- return [];
67
- }
68
- const operation = (0, JsonSchemaMapperContainer_js_1.execMapper)("operation", [operationStore.operation], options);
69
- return operationPaths.map((operationPath) => {
70
- return {
71
- operationPath,
72
- operation,
73
- operationStore
74
- };
75
- });
76
- };
77
- }
78
- function pathsMapper(model, { paths, rootPath, ...options }) {
79
- const store = (0, getJsonEntityStore_js_1.getJsonEntityStore)(model);
80
- const ctrlPath = store.path;
81
- const ctrlRootPath = (0, buildPath_js_1.buildPath)(rootPath + ctrlPath);
82
- options = {
83
- ...options,
84
- ctrlRootPath
85
- };
86
- return [...(0, getOperationsStores_js_1.getOperationsStores)(model).values()]
87
- .filter(removeHiddenOperation_js_1.removeHiddenOperation)
88
- .filter((operationStore) => operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS).length > 0)
89
- .flatMap(mapOperation(options))
90
- .flatMap(mapOperationInPathParameters(options))
91
- .reduce(pushToPath, paths);
92
- }
93
- exports.pathsMapper = pathsMapper;
94
- (0, JsonSchemaMapperContainer_js_1.registerJsonSchemaMapper)("paths", pathsMapper);
95
- //# sourceMappingURL=pathsMapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pathsMapper.js","sourceRoot":"","sources":["../../../../src/components/open-spec/pathsMapper.ts"],"names":[],"mappings":";;;AACA,yEAAiE;AAIjE,gGAAmG;AACnG,2DAAmD;AACnD,yEAAiE;AACjE,6EAAqE;AACrE,mFAA2E;AAC3E,+EAAuE;AACvE,iFAAmE;AACnE,mFAA2E;AAE3E,MAAM,aAAa,GAAG;IACpB,kCAAc,CAAC,GAAG;IAClB,kCAAc,CAAC,GAAG;IAClB,kCAAc,CAAC,IAAI;IACnB,kCAAc,CAAC,GAAG;IAClB,kCAAc,CAAC,KAAK;IACpB,kCAAc,CAAC,IAAI;IACnB,kCAAc,CAAC,OAAO;IACtB,kCAAc,CAAC,MAAM;IACrB,kCAAc,CAAC,KAAK;CACrB,CAAC;AAEF,SAAS,UAAU,CACjB,KAAe,EACf,EACE,IAAI,EACJ,MAAM,EACN,SAAS,EAKV;IAED,OAAO;QACL,GAAG,KAAK;QACR,CAAC,IAAI,CAAC,EAAE;YACN,GAAI,KAAa,CAAC,IAAI,CAAC;YACvB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS;SAClC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,4BAA4B,CAAC,OAA0B;IAC9D,OAAO,CAAC,EACN,aAAa,EACb,SAAS,EACT,cAAc,EAKf,EAAE,EAAE;QACH,MAAM,EAAC,IAAI,EAAE,MAAM,EAAC,G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AC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,WAAW,CAAC,KAAU,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAoB;IACtF,MAAM,KAAK,GAAG,IAAA,0CAAkB,EAAC,KAAK,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC;IAC5B,MAAM,YAAY,GAAG,IAAA,wBAAS,EAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC;IAEpD,OAAO,GAAG;QACR,GAAG,OAAO;QACV,YAAY;KACb,CAAC;IAEF,OAAO,CAAC,GAAG,IAAA,4CAAmB,EAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;SAC5C,MAAM,CAAC,gDAAqB,CAAC;SAC7B,MAAM,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;SACtG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAC9B,OAAO,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;SAC9C,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAC/B,CAAC;AAhBD,kCAgBC;AAED,IAAA,uDAAwB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OPERATION_WS_VERBS = exports.OPERATION_HTTP_VERBS = exports.OperationVerbs = void 0;
4
- var OperationVerbs;
5
- (function (OperationVerbs) {
6
- OperationVerbs["ALL"] = "ALL";
7
- OperationVerbs["GET"] = "GET";
8
- OperationVerbs["POST"] = "POST";
9
- OperationVerbs["PUT"] = "PUT";
10
- OperationVerbs["PATCH"] = "PATCH";
11
- OperationVerbs["HEAD"] = "HEAD";
12
- OperationVerbs["DELETE"] = "DELETE";
13
- OperationVerbs["OPTIONS"] = "OPTIONS";
14
- OperationVerbs["TRACE"] = "TRACE";
15
- OperationVerbs["PUBLISH"] = "PUBLISH";
16
- OperationVerbs["SUBSCRIBE"] = "SUBSCRIBE";
17
- OperationVerbs["CUSTOM"] = "CUSTOM";
18
- })(OperationVerbs = exports.OperationVerbs || (exports.OperationVerbs = {}));
19
- exports.OPERATION_HTTP_VERBS = [
20
- OperationVerbs.ALL,
21
- OperationVerbs.GET,
22
- OperationVerbs.POST,
23
- OperationVerbs.PUT,
24
- OperationVerbs.PATCH,
25
- OperationVerbs.HEAD,
26
- OperationVerbs.DELETE,
27
- OperationVerbs.OPTIONS,
28
- OperationVerbs.TRACE,
29
- OperationVerbs.CUSTOM
30
- ];
31
- exports.OPERATION_WS_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];
32
- //# sourceMappingURL=OperationVerbs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OperationVerbs.js","sourceRoot":"","sources":["../../../src/constants/OperationVerbs.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAaX;AAbD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,6BAAW,CAAA;IACX,+BAAa,CAAA;IACb,6BAAW,CAAA;IACX,iCAAe,CAAA;IACf,+BAAa,CAAA;IACb,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EAbW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAazB;AAEY,QAAA,oBAAoB,GAAG;IAClC,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,KAAK;IACpB,cAAc,CAAC,IAAI;IACnB,cAAc,CAAC,MAAM;IACrB,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,KAAK;IACpB,cAAc,CAAC,MAAM;CACtB,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStatusMessage = exports.getStatusConstant = exports.HTTP_STATUS_MESSAGES = void 0;
4
- const tslib_1 = require("tslib");
5
- const statuses_1 = tslib_1.__importDefault(require("statuses"));
6
- const change_case_1 = require("change-case");
7
- exports.HTTP_STATUS_MESSAGES = statuses_1.default.codes.reduce((map, code) => {
8
- const message = String((0, statuses_1.default)(code));
9
- return {
10
- ...map,
11
- [String(code)]: { label: message, code: (0, change_case_1.constantCase)(message) }
12
- };
13
- }, {});
14
- exports.HTTP_STATUS_MESSAGES["200"].label = "Success";
15
- exports.HTTP_STATUS_MESSAGES["200"].code = "SUCCESS";
16
- function getStatusConstant(status) {
17
- return exports.HTTP_STATUS_MESSAGES[status]?.code;
18
- }
19
- exports.getStatusConstant = getStatusConstant;
20
- function getStatusMessage(status) {
21
- return exports.HTTP_STATUS_MESSAGES[status]?.label;
22
- }
23
- exports.getStatusMessage = getStatusMessage;
24
- //# sourceMappingURL=httpStatusMessages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":";;;;AAAA,gEAAgC;AAChC,6CAAyC;AAE5B,QAAA,oBAAoB,GAAG,kBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAkD,EAAE,IAAY,EAAE,EAAE;IAC7H,MAAM,OAAO,GAAW,MAAM,CAAC,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,OAAO;QACL,GAAG,GAAG;QACN,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAA,0BAAY,EAAC,OAAO,CAAC,EAAC;KAC9D,CAAC;AACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AAEP,4BAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC;AAC9C,4BAAoB,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC;AAE7C,SAAgB,iBAAiB,CAAC,MAAuB;IACvD,OAAQ,4BAA4B,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;AACrD,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,MAAuB;IACtD,OAAQ,4BAA4B,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;AACtD,CAAC;AAFD,4CAEC"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMMON_PROPERTIES = exports.OBJECT_PROPERTIES = exports.ARRAY_PROPERTIES = exports.NUMBER_PROPERTIES = exports.BOOLEAN_PROPERTIES = exports.STRING_PROPERTIES = exports.MANY_OF_PROPERTIES = void 0;
4
- exports.MANY_OF_PROPERTIES = ["oneOf", "allOf", "anyOf"];
5
- exports.STRING_PROPERTIES = ["minLength", "maxLength", "pattern", "format"];
6
- exports.BOOLEAN_PROPERTIES = [];
7
- exports.NUMBER_PROPERTIES = ["minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum", "multipleOf"];
8
- exports.ARRAY_PROPERTIES = ["maxItems", "minItems", "uniqueItems", "items", "contains", "maxContains", "minContains"];
9
- exports.OBJECT_PROPERTIES = [
10
- "maxItems",
11
- "minItems",
12
- "uniqueItems",
13
- "items",
14
- "contains",
15
- "maxContains",
16
- "minContains",
17
- "patternProperties",
18
- "dependencies"
19
- ];
20
- exports.COMMON_PROPERTIES = ["const", "enum"];
21
- //# sourceMappingURL=jsonSchemaProperties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsonSchemaProperties.js","sourceRoot":"","sources":["../../../src/constants/jsonSchemaProperties.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,QAAA,iBAAiB,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AACpE,QAAA,kBAAkB,GAAG,EAAE,CAAC;AACxB,QAAA,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAC;AACjG,QAAA,gBAAgB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;AAC9G,QAAA,iBAAiB,GAAG;IAC/B,UAAU;IACV,UAAU;IACV,aAAa;IACb,OAAO;IACP,UAAU;IACV,aAAa;IACb,aAAa;IACb,mBAAmB;IACnB,cAAc;CACf,CAAC;AACW,QAAA,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Children = void 0;
4
- const core_1 = require("@tsed/core");
5
- const jsonEntityFn_js_1 = require("../common/jsonEntityFn.js");
6
- /**
7
- * Add Children class to compose routes
8
- *
9
- * @decorator
10
- * @swagger
11
- * @schema
12
- * @classDecorator
13
- * @param children
14
- */
15
- function Children(...children) {
16
- return (0, jsonEntityFn_js_1.JsonEntityFn)((store) => {
17
- store.store.set("childrenControllers", children);
18
- children.forEach((childToken) => {
19
- core_1.Store.from(childToken).set("parentController", store.token);
20
- });
21
- });
22
- }
23
- exports.Children = Children;
24
- //# sourceMappingURL=children.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"children.js","sourceRoot":"","sources":["../../../../src/decorators/class/children.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,+DAAuD;AAEvD;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,GAAG,QAAqB;IAC/C,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;QAEjD,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC9B,YAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AARD,4BAQC"}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DiscriminatorValue = void 0;
4
- const change_case_1 = require("change-case");
5
- const jsonEntityFn_js_1 = require("../common/jsonEntityFn.js");
6
- /**
7
- * Declare a Discriminator value on a child class.
8
- *
9
- * ```ts
10
- * export class Event {
11
- * @DiscriminatorKey() // declare this property a discriminator key
12
- * type: string;
13
- *
14
- * @Property()
15
- * value: string;
16
- * }
17
- *
18
- * @DiscriminatorValue("page_view")
19
- * export class PageView extends Event {
20
- * @Required()
21
- * url: string;
22
- * }
23
- *
24
- * @DiscriminatorValue("action")
25
- * export class Action extends Event {
26
- * @Required()
27
- * event: string;
28
- * }
29
- *
30
- * @DiscriminatorValue()
31
- * export class CustomAction extends Event {
32
- * @Required()
33
- * event: string;
34
- *
35
- * @Property()
36
- * meta: string;
37
- * }
38
- * ```
39
- *
40
- * @decorator
41
- * @swagger
42
- * @schema
43
- * @classDecorator
44
- * @param value
45
- * @param values
46
- */
47
- function DiscriminatorValue(value, ...values) {
48
- return (0, jsonEntityFn_js_1.JsonEntityFn)((store) => {
49
- value = value || (0, change_case_1.snakeCase)(store.targetName);
50
- if (store.discriminatorAncestor) {
51
- store.schema.discriminatorValue(value, ...values);
52
- }
53
- });
54
- }
55
- exports.DiscriminatorValue = DiscriminatorValue;
56
- //# sourceMappingURL=discriminatorValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"discriminatorValue.js","sourceRoot":"","sources":["../../../../src/decorators/class/discriminatorValue.ts"],"names":[],"mappings":";;;AAAA,6CAAsC;AACtC,+DAAuD;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,kBAAkB,CAAC,KAAc,EAAE,GAAG,MAAgB;IACpE,OAAO,IAAA,8BAAY,EAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,KAAK,GAAG,KAAK,IAAI,IAAA,uBAAS,EAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,KAAK,CAAC,qBAAqB,EAAE;YAC/B,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,CAAC;SACnD;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,gDAOC"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CollectionContains = void 0;
4
- const collectionOf_js_1 = require("./collectionOf.js");
5
- /**
6
- * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
7
- *
8
- * The array instance will be valid against "contains" if at least one of its elements is valid against the given schema.
9
- *
10
- * ```typescript
11
- * class Model {
12
- * @CollectionContains(String).MinLength(0).MaxLength(0)
13
- * property: string[];
14
- * }
15
- * ```
16
- *
17
- * @param {Type<any>} type
18
- * @decorator
19
- * @validation
20
- * @swagger
21
- * @schema
22
- * @input
23
- * @collections
24
- */
25
- function CollectionContains(type) {
26
- return (0, collectionOf_js_1.CollectionOf)(type).Contains();
27
- }
28
- exports.CollectionContains = CollectionContains;
29
- //# sourceMappingURL=collectionContains.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collectionContains.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionContains.ts"],"names":[],"mappings":";;;AAAA,uDAA+C;AAE/C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,kBAAkB,CAAC,IAAS;IAC1C,OAAO,IAAA,8BAAY,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AACvC,CAAC;AAFD,gDAEC"}
@@ -1,102 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MapOf = exports.ArrayOf = exports.CollectionOf = void 0;
4
- const JsonEntityStore_js_1 = require("../../domain/JsonEntityStore.js");
5
- /**
6
- * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
7
- *
8
- * ```typescript
9
- * class Model {
10
- * @CollectionOf(String).MinLength(0).MaxLength(0)
11
- * property: string[];
12
- * }
13
- * ```
14
- * ::: warning
15
- * You mustn't use the `type Type = string | number` as parameters Type.
16
- *
17
- * This example doesn't work:
18
- *
19
- * ```typescript
20
- * type Type = "string" | "number"
21
- * class Model {
22
- * @CollectionOf(Type)
23
- * property: Type[];
24
- * }
25
- * ```
26
- * :::
27
- *
28
- * @param {Type<any>} type
29
- * @param collectionType
30
- * @decorator
31
- * @validation
32
- * @swagger
33
- * @schema
34
- * @input
35
- * @collections
36
- */
37
- function CollectionOf(type, collectionType) {
38
- if (!type) {
39
- throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");
40
- }
41
- const schema = {};
42
- let contains = false;
43
- const decorator = (...args) => {
44
- const store = JsonEntityStore_js_1.JsonEntityStore.from(...args);
45
- if (collectionType) {
46
- store.collectionType = collectionType;
47
- store.schema.type(collectionType);
48
- }
49
- store.type = type;
50
- store.itemSchema.type(type);
51
- store.schema.assign(schema);
52
- if (store.isArray && contains) {
53
- store.schema.set("contains", store.schema.get("items"));
54
- store.schema.delete("items");
55
- }
56
- };
57
- decorator.MinItems = (minItems) => {
58
- schema.minItems = minItems;
59
- return decorator;
60
- };
61
- decorator.MaxItems = (maxItems) => {
62
- schema.maxItems = maxItems;
63
- return decorator;
64
- };
65
- decorator.MinProperties = (minProperties) => {
66
- schema.minProperties = minProperties;
67
- return decorator;
68
- };
69
- decorator.MaxProperties = (maxProperties) => {
70
- schema.maxProperties = maxProperties;
71
- return decorator;
72
- };
73
- decorator.Contains = () => {
74
- contains = true;
75
- return decorator;
76
- };
77
- decorator.UniqueItems = (uniqueItems = true) => {
78
- schema.uniqueItems = uniqueItems;
79
- return decorator;
80
- };
81
- return decorator;
82
- }
83
- exports.CollectionOf = CollectionOf;
84
- /**
85
- * Alias of @@GenericOf@@ decorator.
86
- * @param type
87
- * @decorator
88
- */
89
- function ArrayOf(type) {
90
- return CollectionOf(type, Array);
91
- }
92
- exports.ArrayOf = ArrayOf;
93
- /**
94
- * Alias of @@GenericOf@@ decorator.
95
- * @param type
96
- * @decorator
97
- */
98
- function MapOf(type) {
99
- return CollectionOf(type, Map);
100
- }
101
- exports.MapOf = MapOf;
102
- //# sourceMappingURL=collectionOf.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collectionOf.js","sourceRoot":"","sources":["../../../../src/decorators/collections/collectionOf.ts"],"names":[],"mappings":";;;AAAA,wEAAgE;AAkEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,YAAY,CAAC,IAAS,EAAE,cAAoB;IAC1D,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CACb,iJAAiJ,CAClJ,CAAC;KACH;IAED,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,IAAI,QAAQ,GAAY,KAAK,CAAC;IAE9B,MAAM,SAAS,GAAG,CAAC,GAAG,IAAS,EAAE,EAAE;QACjC,MAAM,KAAK,GAAG,oCAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5C,IAAI,cAAc,EAAE;YAClB,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;YACtC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SACnC;QAED,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,KAAK,CAAC,UAA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