@tsed/schema 8.34.0 → 8.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/lib/esm/compat.js +8 -0
  2. package/lib/esm/components/index.js +37 -27
  3. package/lib/esm/components/{default → mappers/default}/anyMapper.js +5 -5
  4. package/lib/esm/components/{default → mappers/default}/classMapper.js +5 -5
  5. package/lib/esm/components/{default → mappers/default}/discriminatorMappingMapper.js +3 -3
  6. package/lib/esm/components/{default → mappers/default}/enumsMapper.js +2 -2
  7. package/lib/esm/components/{default → mappers/default}/genericsMapper.js +7 -6
  8. package/lib/esm/components/{default → mappers/default}/inheritedClassMapper.js +3 -3
  9. package/lib/esm/components/{default → mappers/default}/lazyRefMapper.js +3 -3
  10. package/lib/esm/components/{default → mappers/default}/mapMapper.js +2 -2
  11. package/lib/esm/components/{default → mappers/default}/nextMapper.js +16 -16
  12. package/lib/esm/components/{default → mappers/default}/nullableMapper.js +3 -3
  13. package/lib/esm/components/{default → mappers/default}/objectMapper.js +4 -4
  14. package/lib/esm/components/mappers/default/ofMapper.js +9 -0
  15. package/lib/esm/components/{default → mappers/default}/requiredMapper.js +3 -3
  16. package/lib/esm/components/{default → mappers/default}/schemaMapper.js +11 -6
  17. package/lib/esm/components/mappers/open-spec/discriminatorMappingMapper.js +8 -0
  18. package/lib/esm/components/mappers/open-spec/enumsMapper.js +12 -0
  19. package/lib/esm/components/{open-spec → mappers/open-spec}/generate.js +3 -4
  20. package/lib/esm/components/{open-spec → mappers/open-spec}/nullableMapper.js +3 -4
  21. package/lib/esm/components/{open-spec → mappers/open-spec}/operationInFilesMapper.js +2 -2
  22. package/lib/esm/components/{open-spec → mappers/open-spec}/operationInParameterMapper.js +3 -3
  23. package/lib/esm/components/mappers/open-spec/operationInParametersMapper.js +5 -0
  24. package/lib/esm/components/{open-spec → mappers/open-spec}/operationInQueryMapper.js +3 -3
  25. package/lib/esm/components/{open-spec → mappers/open-spec}/operationMapper.js +4 -4
  26. package/lib/esm/components/{open-spec → mappers/open-spec}/operationMediaMapper.js +2 -2
  27. package/lib/esm/components/{open-spec → mappers/open-spec}/operationRequestBodyMapper.js +4 -4
  28. package/lib/esm/components/{open-spec → mappers/open-spec}/operationResponseMapper.js +2 -2
  29. package/lib/esm/components/{open-spec → mappers/open-spec}/pathsMapper.js +10 -10
  30. package/lib/esm/{domain → components/stores}/JsonClassStore.js +8 -13
  31. package/lib/esm/{domain → components/stores}/JsonMethodStore.js +33 -28
  32. package/lib/esm/{domain → components/stores}/JsonParameterStore.js +14 -18
  33. package/lib/esm/{domain → components/stores}/JsonPropertyStore.js +15 -18
  34. package/lib/esm/components/types/arrayType.js +15 -0
  35. package/lib/esm/components/types/classType.js +8 -0
  36. package/lib/esm/components/types/genericType.js +8 -0
  37. package/lib/esm/components/types/mapType.js +15 -0
  38. package/lib/esm/components/types/primitiveType.js +21 -0
  39. package/lib/esm/components/types/setType.js +12 -0
  40. package/lib/esm/decorators/class/discriminatorValue.js +1 -1
  41. package/lib/esm/decorators/collections/collectionOf.js +2 -2
  42. package/lib/esm/decorators/collections/maxItems.js +1 -1
  43. package/lib/esm/decorators/collections/maxProperties.js +1 -1
  44. package/lib/esm/decorators/collections/minItems.js +1 -1
  45. package/lib/esm/decorators/collections/minProperties.js +1 -1
  46. package/lib/esm/decorators/collections/uniqueItems.js +1 -1
  47. package/lib/esm/decorators/common/defaultMsg.js +1 -1
  48. package/lib/esm/decorators/common/discriminatorKey.js +1 -1
  49. package/lib/esm/decorators/common/enum.js +1 -1
  50. package/lib/esm/decorators/common/exclusiveMaximum.js +1 -1
  51. package/lib/esm/decorators/common/exclusiveMinimum.js +1 -1
  52. package/lib/esm/decorators/common/format.js +1 -1
  53. package/lib/esm/decorators/common/jsonEntityFn.js +2 -2
  54. package/lib/esm/decorators/common/maxLength.js +1 -1
  55. package/lib/esm/decorators/common/maximum.js +1 -1
  56. package/lib/esm/decorators/common/minLength.js +1 -1
  57. package/lib/esm/decorators/common/minimum.js +1 -1
  58. package/lib/esm/decorators/common/multipleOf.js +1 -1
  59. package/lib/esm/decorators/common/name.js +1 -1
  60. package/lib/esm/decorators/common/nullable.js +2 -2
  61. package/lib/esm/decorators/common/pattern.js +1 -1
  62. package/lib/esm/decorators/common/required.js +1 -1
  63. package/lib/esm/decorators/common/requiredGroups.js +1 -1
  64. package/lib/esm/decorators/common/typeError.js +1 -1
  65. package/lib/esm/decorators/config/jsonEntityComponent.js +3 -2
  66. package/lib/esm/decorators/generics/genericOf.js +2 -2
  67. package/lib/esm/decorators/generics/generics.js +2 -3
  68. package/lib/esm/decorators/operations/consumes.js +1 -1
  69. package/lib/esm/decorators/operations/deprecated.js +1 -1
  70. package/lib/esm/decorators/operations/header.js +1 -1
  71. package/lib/esm/decorators/operations/in.js +5 -6
  72. package/lib/esm/decorators/operations/inFile.js +2 -2
  73. package/lib/esm/decorators/operations/operation.js +1 -1
  74. package/lib/esm/decorators/operations/produces.js +1 -1
  75. package/lib/esm/decorators/operations/publish.js +1 -1
  76. package/lib/esm/decorators/operations/returns.js +4 -4
  77. package/lib/esm/decorators/operations/route.js +1 -1
  78. package/lib/esm/decorators/operations/security.js +1 -1
  79. package/lib/esm/decorators/operations/subscribe.js +1 -1
  80. package/lib/esm/decorators/operations/tags.js +1 -1
  81. package/lib/esm/domain/DecoratorContext.js +2 -2
  82. package/lib/esm/domain/JsonEntityStore.js +7 -41
  83. package/lib/esm/domain/JsonLazyRef.js +1 -1
  84. package/lib/esm/domain/JsonMap.js +1 -1
  85. package/lib/esm/domain/JsonOperation.js +1 -1
  86. package/lib/esm/domain/JsonParameter.js +3 -3
  87. package/lib/esm/domain/JsonRequestBody.js +1 -1
  88. package/lib/esm/domain/JsonResponse.js +2 -2
  89. package/lib/esm/domain/JsonSchema.js +92 -137
  90. package/lib/esm/domain/index.js +26 -0
  91. package/lib/esm/{utils/getJsonSchema.js → fn/compile.js} +20 -7
  92. package/lib/esm/fn/enums.js +1 -1
  93. package/lib/esm/fn/from.js +32 -9
  94. package/lib/esm/fn/generic.js +9 -0
  95. package/lib/esm/fn/index.js +25 -4
  96. package/lib/esm/fn/lazyRef.js +3 -3
  97. package/lib/esm/fn/oas/compileSpec.js +9 -0
  98. package/lib/esm/{utils → fn/oas}/generateSpec.js +2 -2
  99. package/lib/esm/{utils → fn/oas}/getSpec.js +4 -4
  100. package/lib/esm/{utils → fn/oas}/getSpecType.js +1 -1
  101. package/lib/esm/{utils → fn/oas}/mapOpenSpec.js +1 -1
  102. package/lib/esm/hooks/alterOneOf.js +1 -1
  103. package/lib/esm/index.js +59 -48
  104. package/lib/esm/registries/JsonEntitiesContainer.js +38 -0
  105. package/lib/esm/registries/JsonSchemaMapperContainer.js +10 -1
  106. package/lib/esm/registries/JsonTypesContainer.js +18 -0
  107. package/lib/esm/utils/generics.js +15 -2
  108. package/lib/esm/utils/getInheritedStores.js +1 -1
  109. package/lib/esm/utils/getOperationsRoutes.js +3 -3
  110. package/lib/esm/utils/getOperationsStores.js +4 -4
  111. package/lib/esm/utils/getPropertiesStores.js +2 -2
  112. package/lib/esm/utils/ref.js +2 -2
  113. package/lib/types/compat.d.ts +17 -0
  114. package/lib/types/components/index.d.ts +37 -27
  115. package/lib/types/components/{default → mappers/default}/anyMapper.d.ts +1 -1
  116. package/lib/types/components/mappers/default/classMapper.d.ts +3 -0
  117. package/lib/types/components/{default → mappers/default}/discriminatorMappingMapper.d.ts +2 -2
  118. package/lib/types/components/mappers/default/enumsMapper.d.ts +3 -0
  119. package/lib/types/components/{default → mappers/default}/genericsMapper.d.ts +2 -2
  120. package/lib/types/components/{default → mappers/default}/inheritedClassMapper.d.ts +1 -1
  121. package/lib/types/components/mappers/default/lazyRefMapper.d.ts +3 -0
  122. package/lib/types/components/{default → mappers/default}/mapMapper.d.ts +1 -1
  123. package/lib/types/components/{default → mappers/default}/nextMapper.d.ts +2 -2
  124. package/lib/types/components/{default → mappers/default}/nullableMapper.d.ts +1 -1
  125. package/lib/types/components/{default → mappers/default}/objectMapper.d.ts +1 -1
  126. package/lib/types/components/mappers/default/ofMapper.d.ts +3 -0
  127. package/lib/types/components/mappers/default/requiredMapper.d.ts +3 -0
  128. package/lib/types/components/mappers/default/schemaMapper.d.ts +3 -0
  129. package/lib/types/components/mappers/open-spec/enumsMapper.d.ts +3 -0
  130. package/lib/types/components/mappers/open-spec/generate.d.ts +1 -0
  131. package/lib/types/components/mappers/open-spec/nullableMapper.d.ts +3 -0
  132. package/lib/types/components/{open-spec → mappers/open-spec}/operationInParameterMapper.d.ts +3 -3
  133. package/lib/types/components/mappers/open-spec/operationInParametersMapper.d.ts +3 -0
  134. package/lib/types/components/mappers/open-spec/operationMapper.d.ts +3 -0
  135. package/lib/types/components/mappers/open-spec/operationMediaMapper.d.ts +3 -0
  136. package/lib/types/components/mappers/open-spec/operationRequestBodyMapper.d.ts +3 -0
  137. package/lib/types/components/mappers/open-spec/operationResponseMapper.d.ts +3 -0
  138. package/lib/types/components/{open-spec → mappers/open-spec}/pathsMapper.d.ts +1 -1
  139. package/lib/types/{domain → components/stores}/JsonClassStore.d.ts +4 -4
  140. package/lib/types/{domain → components/stores}/JsonMethodStore.d.ts +33 -19
  141. package/lib/types/{domain → components/stores}/JsonParameterStore.d.ts +9 -5
  142. package/lib/types/{domain → components/stores}/JsonPropertyStore.d.ts +7 -4
  143. package/lib/types/components/types/arrayType.d.ts +2 -0
  144. package/lib/types/components/types/classType.d.ts +2 -0
  145. package/lib/types/components/types/genericType.d.ts +2 -0
  146. package/lib/types/components/types/mapType.d.ts +2 -0
  147. package/lib/types/components/types/primitiveType.d.ts +2 -0
  148. package/lib/types/components/types/setType.d.ts +2 -0
  149. package/lib/types/decorators/common/any.d.ts +1 -1
  150. package/lib/types/decorators/common/examples.d.ts +1 -1
  151. package/lib/types/decorators/common/format.d.ts +1 -1
  152. package/lib/types/decorators/common/ignore.d.ts +1 -1
  153. package/lib/types/decorators/common/jsonEntityFn.d.ts +1 -1
  154. package/lib/types/decorators/config/jsonEntityComponent.d.ts +2 -1
  155. package/lib/types/decorators/generics/genericOf.d.ts +1 -1
  156. package/lib/types/decorators/operations/header.d.ts +1 -1
  157. package/lib/types/decorators/operations/in.d.ts +1 -2
  158. package/lib/types/decorators/operations/location.d.ts +1 -1
  159. package/lib/types/decorators/operations/redirect.d.ts +1 -1
  160. package/lib/types/decorators/operations/returns.d.ts +3 -3
  161. package/lib/types/decorators/operations/status.d.ts +1 -1
  162. package/lib/types/domain/Generics.d.ts +6 -0
  163. package/lib/types/domain/JsonEntityStore.d.ts +8 -19
  164. package/lib/types/domain/JsonLazyRef.d.ts +1 -1
  165. package/lib/types/domain/JsonMap.d.ts +1 -1
  166. package/lib/types/domain/JsonMedia.d.ts +1 -1
  167. package/lib/types/domain/JsonOperation.d.ts +2 -2
  168. package/lib/types/domain/JsonOperationRoute.d.ts +3 -3
  169. package/lib/types/domain/JsonParameter.d.ts +3 -3
  170. package/lib/types/domain/JsonRequestBody.d.ts +1 -1
  171. package/lib/types/domain/JsonResponse.d.ts +1 -1
  172. package/lib/types/domain/JsonSchema.d.ts +28 -22
  173. package/lib/types/{interfaces → domain}/JsonSchemaOptions.d.ts +14 -6
  174. package/lib/types/domain/__fixtures__/inspectOperationsPaths.d.ts +1 -1
  175. package/lib/types/domain/index.d.ts +26 -0
  176. package/lib/types/domain/types.d.ts +1 -1
  177. package/lib/types/fn/any.d.ts +1 -1
  178. package/lib/types/fn/boolean.d.ts +1 -1
  179. package/lib/types/{utils → fn}/compile.d.ts +10 -3
  180. package/lib/types/fn/date.d.ts +3 -3
  181. package/lib/types/fn/email.d.ts +1 -1
  182. package/lib/types/fn/from.d.ts +31 -3
  183. package/lib/types/fn/generic.d.ts +10 -0
  184. package/lib/types/fn/index.d.ts +24 -3
  185. package/lib/types/fn/integer.d.ts +1 -1
  186. package/lib/types/fn/lazyRef.d.ts +1 -1
  187. package/lib/types/fn/number.d.ts +1 -1
  188. package/lib/types/fn/oas/compileSpec.d.ts +6 -0
  189. package/lib/types/{utils → fn/oas}/getSpec.d.ts +1 -1
  190. package/lib/types/{utils → fn/oas}/getSpecType.d.ts +1 -1
  191. package/lib/types/{utils → fn/oas}/transformToOS2.d.ts +1 -1
  192. package/lib/types/fn/object.d.ts +1 -1
  193. package/lib/types/fn/string.d.ts +1 -1
  194. package/lib/types/fn/uri.d.ts +1 -1
  195. package/lib/types/fn/url.d.ts +1 -1
  196. package/lib/types/hooks/alterOneOf.d.ts +1 -1
  197. package/lib/types/hooks/alterRequiredGroups.d.ts +1 -1
  198. package/lib/types/index.d.ts +59 -48
  199. package/lib/types/{utils/getJsonEntityStore.d.ts → registries/JsonEntitiesContainer.d.ts} +5 -10
  200. package/lib/types/registries/JsonSchemaMapperContainer.d.ts +7 -1
  201. package/lib/types/registries/JsonTypesContainer.d.ts +15 -0
  202. package/lib/types/registries/{enumRegistries.d.ts → enumRegistry.d.ts} +1 -1
  203. package/lib/types/utils/generics.d.ts +13 -5
  204. package/lib/types/utils/getInheritedStores.d.ts +1 -1
  205. package/lib/types/utils/getOperationsRoutes.d.ts +3 -3
  206. package/lib/types/utils/getOperationsStores.d.ts +1 -1
  207. package/lib/types/utils/getPropertiesStores.d.ts +1 -1
  208. package/lib/types/utils/mapHeaders.d.ts +1 -1
  209. package/lib/types/utils/operationIdFormatter.d.ts +1 -1
  210. package/lib/types/utils/ref.d.ts +1 -1
  211. package/lib/types/utils/removeHiddenOperation.d.ts +1 -1
  212. package/lib/types/utils/toJsonMapCollection.d.ts +1 -1
  213. package/package.json +18 -19
  214. package/lib/esm/components/default/ofMapper.js +0 -9
  215. package/lib/esm/components/open-spec/discriminatorMappingMapper.js +0 -6
  216. package/lib/esm/components/open-spec/enumsMapper.js +0 -14
  217. package/lib/esm/components/open-spec/operationInParametersMapper.js +0 -5
  218. package/lib/esm/utils/compile.js +0 -13
  219. package/lib/esm/utils/getJsonEntityStore.js +0 -13
  220. package/lib/types/components/default/classMapper.d.ts +0 -3
  221. package/lib/types/components/default/enumsMapper.d.ts +0 -3
  222. package/lib/types/components/default/lazyRefMapper.d.ts +0 -3
  223. package/lib/types/components/default/ofMapper.d.ts +0 -3
  224. package/lib/types/components/default/requiredMapper.d.ts +0 -3
  225. package/lib/types/components/default/schemaMapper.d.ts +0 -3
  226. package/lib/types/components/open-spec/enumsMapper.d.ts +0 -3
  227. package/lib/types/components/open-spec/nullableMapper.d.ts +0 -3
  228. package/lib/types/components/open-spec/operationInParametersMapper.d.ts +0 -3
  229. package/lib/types/components/open-spec/operationMapper.d.ts +0 -3
  230. package/lib/types/components/open-spec/operationMediaMapper.d.ts +0 -3
  231. package/lib/types/components/open-spec/operationRequestBodyMapper.d.ts +0 -3
  232. package/lib/types/components/open-spec/operationResponseMapper.d.ts +0 -3
  233. package/lib/types/utils/getJsonSchema.d.ts +0 -6
  234. package/lib/esm/{interfaces/IgnoreCallback.js → domain/Generics.js} +0 -0
  235. package/lib/esm/{interfaces/JsonHookContext.js → domain/IgnoreCallback.js} +0 -0
  236. package/lib/esm/{interfaces/JsonOpenSpec.js → domain/JsonHookContext.js} +0 -0
  237. package/lib/esm/{interfaces/JsonSchemaOptions.js → domain/JsonOpenSpec.js} +0 -0
  238. package/lib/{types/components/open-spec/discriminatorMappingMapper.d.ts → esm/domain/JsonSchemaOptions.js} +0 -0
  239. package/lib/esm/{utils → fn/oas}/mapOpenSpec2.js +0 -0
  240. package/lib/esm/{utils → fn/oas}/mapOpenSpec3.js +0 -0
  241. package/lib/esm/{utils → fn/oas}/mapOpenSpecInfo.js +0 -0
  242. package/lib/esm/{utils → fn/oas}/mergeSpec.js +0 -0
  243. package/lib/esm/{utils → fn/oas}/transformToOS2.js +0 -0
  244. package/lib/esm/registries/{enumRegistries.js → enumRegistry.js} +0 -0
  245. package/lib/types/components/{open-spec/generate.d.ts → mappers/open-spec/discriminatorMappingMapper.d.ts} +0 -0
  246. package/lib/types/components/{open-spec → mappers/open-spec}/operationInFilesMapper.d.ts +0 -0
  247. package/lib/types/components/{open-spec → mappers/open-spec}/operationInQueryMapper.d.ts +0 -0
  248. package/lib/types/{interfaces → domain}/IgnoreCallback.d.ts +0 -0
  249. package/lib/types/{interfaces → domain}/JsonHookContext.d.ts +0 -0
  250. package/lib/types/{interfaces → domain}/JsonOpenSpec.d.ts +0 -0
  251. package/lib/types/{utils → fn/oas}/generateSpec.d.ts +1 -1
  252. /package/lib/types/{utils → fn/oas}/mapOpenSpec.d.ts +0 -0
  253. /package/lib/types/{utils → fn/oas}/mapOpenSpec2.d.ts +0 -0
  254. /package/lib/types/{utils → fn/oas}/mapOpenSpec3.d.ts +0 -0
  255. /package/lib/types/{utils → fn/oas}/mapOpenSpecInfo.d.ts +0 -0
  256. /package/lib/types/{utils → fn/oas}/mergeSpec.d.ts +0 -0
@@ -1,15 +1,16 @@
1
1
  import { ancestorOf, ancestorsOf, classOf, isArray, isClass, isFunction, isObject, isPlainObject, isPrimitiveClass, isTemporal, nameOf, uniq } from "@tsed/core";
2
+ import { Discriminator } from "./JsonDiscriminator.js";
2
3
  import { Hooks } from "@tsed/hooks";
3
4
  import { VendorKeys } from "../constants/VendorKeys.js";
4
- import { enumsRegistry } from "../registries/enumRegistries.js";
5
+ import { enumsRegistry } from "../registries/enumRegistry.js";
5
6
  import { execMapper } from "../registries/JsonSchemaMapperContainer.js";
6
7
  import { getComputedType } from "../utils/getComputedType.js";
8
+ import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
7
9
  import { getJsonType } from "../utils/getJsonType.js";
10
+ import { getTypeResolver } from "../registries/JsonTypesContainer.js";
8
11
  import { matchGroups } from "../utils/matchGroups.js";
9
12
  import { serializeEnumValues } from "../utils/serializeEnumValues.js";
10
13
  import { toJsonRegex } from "../utils/toJsonRegex.js";
11
- import { Discriminator } from "./JsonDiscriminator.js";
12
- import { JsonEntityStore } from "./JsonEntityStore.js";
13
14
  function isEnum(type) {
14
15
  return isObject(type) && !("toJSON" in type);
15
16
  }
@@ -45,7 +46,7 @@ function isEnum(type) {
45
46
  * email: string;
46
47
  * }
47
48
  *
48
- * const userSchema = JsonSchema.from(User);
49
+ * const userSchema = s.from(User);
49
50
  *
50
51
  * // Generate JSON Schema output
51
52
  * const jsonSchema = userSchema.toJSON();
@@ -178,8 +179,8 @@ export class JsonSchema extends Map {
178
179
  */
179
180
  get discriminatorAncestor() {
180
181
  const ancestors = ancestorsOf(this.#target);
181
- const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);
182
- return ancestor && JsonEntityStore.from(ancestor).schema;
182
+ const ancestor = ancestors.find((ancestor) => getJsonEntityStore(ancestor).schema.isDiscriminator);
183
+ return ancestor && getJsonEntityStore(ancestor).schema;
183
184
  }
184
185
  /**
185
186
  * Get the computed TypeScript class or type for this schema.
@@ -269,33 +270,38 @@ export class JsonSchema extends Map {
269
270
  *
270
271
  * ```typescript
271
272
  * // From a class
272
- * const schema1 = JsonSchema.from(User);
273
+ * const schema1 = s.from(User);
273
274
  *
274
275
  * // From a primitive
275
- * const schema2 = JsonSchema.from(String);
276
+ * const schema2 = s.from(String);
276
277
  *
277
278
  * // From a schema object
278
- * const schema3 = JsonSchema.from({type: "string", minLength: 1});
279
+ * const schema3 = s.string().minLength(1);
279
280
  *
280
281
  * // From existing schema (no-op)
281
- * const schema4 = JsonSchema.from(schema1);
282
+ * const schema4 = s.from(schema1);
282
283
  * ```
283
284
  *
284
285
  * @param item - The input to convert to a JsonSchema
285
286
  * @returns A JsonSchema instance representing the input
286
- */
287
- static from(item) {
288
- if (item instanceof JsonSchema) {
289
- return item;
290
- }
291
- if (item && classOf(item) !== Object && isClass(item)) {
292
- return JsonEntityStore.from(item).schema;
293
- }
294
- if (isPrimitiveClass(item) || item === Date || isTemporal(item) || item === null) {
295
- return new JsonSchema({ type: item });
296
- }
297
- return new JsonSchema(item);
298
- }
287
+ * @deprecated
288
+ */
289
+ // static from(item: Partial<JsonSchemaObject> | Type<any> | JsonSchema | undefined) {
290
+ // // console.trace("JsonSchema.from", item)
291
+ // if (item instanceof JsonSchema) {
292
+ // return item;
293
+ // }
294
+ //
295
+ // if (item && classOf(item) !== Object && isClass(item)) {
296
+ // return getJsonEntityStore(item).schema;
297
+ // }
298
+ //
299
+ // if (isPrimitiveClass(item) || item === Date || isTemporal(item) || item === null) {
300
+ // return new JsonSchema({type: item as Type});
301
+ // }
302
+ //
303
+ // return new JsonSchema(item as Partial<JsonSchemaObject>);
304
+ // }
299
305
  static add(property, method) {
300
306
  Object.defineProperty(JsonSchema.prototype, property, {
301
307
  value: method,
@@ -437,24 +443,14 @@ export class JsonSchema extends Map {
437
443
  this.vendorKey(VendorKeys.GENERIC_LABEL, genericLabel);
438
444
  return this;
439
445
  }
440
- /**
441
- * Specify the concrete types for generic parameters.
442
- *
443
- * When using a generic class, this method assigns the actual types that should
444
- * replace the generic parameters for this specific instance.
445
- *
446
- * ### Usage
447
- *
448
- * ```typescript
449
- * // For Paginated<User>
450
- * schema.genericOf([User]);
451
- * ```
452
- *
453
- * @param generics - Arrays of generic type values to apply
454
- * @returns This schema instance for method chaining
455
- */
456
446
  genericOf(...generics) {
457
- const mapped = this.mapGenerics(this.#itemSchema || this.mapToJsonSchema(this.getTarget()), generics);
447
+ if (!generics.length) {
448
+ return this;
449
+ }
450
+ const isGenericsMap = generics.length === 1 && isPlainObject(generics[0]) && Object.values(generics[0]).every(isArray);
451
+ const mapped = isGenericsMap
452
+ ? generics[0]
453
+ : this.mapGenerics(this.#itemSchema || this.toSchema(this.getTarget()), generics.map((generic) => (Array.isArray(generic) ? generic : [generic])));
458
454
  this.vendorKey(VendorKeys.GENERIC_OF, mapped);
459
455
  return this;
460
456
  }
@@ -486,7 +482,7 @@ export class JsonSchema extends Map {
486
482
  * @returns The item schema instance
487
483
  */
488
484
  itemSchema(obj = {}) {
489
- this.#itemSchema = this.#itemSchema || this.mapToJsonSchema(obj);
485
+ this.#itemSchema = this.#itemSchema || this.toSchema(obj);
490
486
  if (isPlainObject(obj)) {
491
487
  this.#itemSchema.assign(obj);
492
488
  }
@@ -714,7 +710,7 @@ export class JsonSchema extends Map {
714
710
  * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10
715
711
  */
716
712
  additionalItems(additionalItems) {
717
- super.set("additionalItems", this.mapToJsonSchema(additionalItems));
713
+ super.set("additionalItems", this.toSchema(additionalItems));
718
714
  return this;
719
715
  }
720
716
  /**
@@ -722,7 +718,7 @@ export class JsonSchema extends Map {
722
718
  * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14
723
719
  */
724
720
  contains(contains) {
725
- super.set("contains", this.mapToJsonSchema(contains));
721
+ super.set("contains", this.toSchema(contains));
726
722
  return this;
727
723
  }
728
724
  /**
@@ -749,8 +745,15 @@ export class JsonSchema extends Map {
749
745
  * Set the items' schema for array/set collections
750
746
  * @param items The schema for array/set items
751
747
  */
752
- items(items) {
753
- super.set("items", (this.#itemSchema = this.mapToJsonSchema(items)));
748
+ items(items, init = false) {
749
+ if (init) {
750
+ if (!this.has("items")) {
751
+ super.set("items", this.itemSchema(items));
752
+ }
753
+ }
754
+ else {
755
+ super.set("items", (this.#itemSchema = this.toSchema(items)));
756
+ }
754
757
  return this;
755
758
  }
756
759
  $comment(comment) {
@@ -956,8 +959,15 @@ export class JsonSchema extends Map {
956
959
  * The default value is an empty schema that allows any value for additional properties.
957
960
  * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20
958
961
  */
959
- additionalProperties(additionalProperties) {
960
- super.set("additionalProperties", this.mapToJsonSchema(additionalProperties));
962
+ additionalProperties(additionalProperties, init = false) {
963
+ if (init) {
964
+ if (!this.has("additionalProperties")) {
965
+ super.set("additionalProperties", this.itemSchema(additionalProperties));
966
+ }
967
+ }
968
+ else {
969
+ super.set("additionalProperties", this.toSchema(additionalProperties));
970
+ }
961
971
  return this;
962
972
  }
963
973
  /**
@@ -990,7 +1000,7 @@ export class JsonSchema extends Map {
990
1000
  * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22
991
1001
  */
992
1002
  propertyNames(propertyNames) {
993
- super.set("propertyNames", this.mapToJsonSchema(propertyNames));
1003
+ super.set("propertyNames", this.toSchema(propertyNames));
994
1004
  return this;
995
1005
  }
996
1006
  enum(enumValue, ...enumValues) {
@@ -1048,7 +1058,7 @@ export class JsonSchema extends Map {
1048
1058
  * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29
1049
1059
  */
1050
1060
  not(not) {
1051
- super.set("not", this.mapToJsonSchema(not));
1061
+ super.set("not", this.toSchema(not));
1052
1062
  return this;
1053
1063
  }
1054
1064
  /**
@@ -1151,78 +1161,14 @@ export class JsonSchema extends Map {
1151
1161
  * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25
1152
1162
  */
1153
1163
  type(type) {
1154
- switch (type) {
1155
- case "map":
1156
- case Map:
1157
- super.set("type", getJsonType(type));
1158
- this.target(type);
1159
- this.#isCollection = true;
1160
- if (!this.has("additionalProperties")) {
1161
- super.set("additionalProperties", this.itemSchema({}));
1162
- }
1163
- break;
1164
- case "array":
1165
- case Array:
1166
- super.set("type", getJsonType(type));
1167
- this.target(type);
1168
- this.#isCollection = true;
1169
- if (!this.has("items")) {
1170
- super.set("items", this.itemSchema({}));
1171
- }
1172
- break;
1173
- case "set":
1174
- case Set:
1175
- super.set("type", getJsonType(type));
1176
- this.target(type);
1177
- this.#isCollection = true;
1178
- this.uniqueItems(true);
1179
- if (!this.has("items")) {
1180
- super.set("items", this.itemSchema({}));
1181
- }
1182
- break;
1183
- case "integer":
1184
- this.integer();
1185
- break;
1186
- case "number":
1187
- case "string":
1188
- case "boolean":
1189
- case "object":
1190
- case Object:
1191
- case Date:
1192
- case Boolean:
1193
- case Number:
1194
- case String:
1195
- super.set("type", getJsonType(type));
1196
- this.target(type);
1197
- if (!this.has("properties")) {
1198
- super.set("properties", {});
1199
- }
1200
- break;
1201
- default:
1202
- if (isTemporal(type)) {
1203
- // Temporal.* types serialize to an ISO-8601 string, like Date.
1204
- super.set("type", getJsonType(type));
1205
- this.target(type);
1206
- if (!this.has("properties")) {
1207
- super.set("properties", {});
1208
- }
1209
- }
1210
- else if (isClass(type) || isFunction(type)) {
1211
- super.set("type", undefined);
1212
- this.target(type);
1213
- if (!this.has("properties")) {
1214
- super.set("properties", {});
1215
- }
1216
- }
1217
- else {
1218
- const jsonType = getJsonType(type);
1219
- if (jsonType === "generic") {
1220
- this.genericLabel(type);
1221
- }
1222
- else {
1223
- super.set("type", jsonType);
1224
- }
1225
- }
1164
+ const resolver = getTypeResolver(type);
1165
+ if (resolver) {
1166
+ const jsonType = resolver.jsonType?.(type);
1167
+ jsonType && super.set("type", jsonType);
1168
+ resolver?.init?.(this, type);
1169
+ }
1170
+ else {
1171
+ super.set("type", getJsonType(type));
1226
1172
  }
1227
1173
  return this;
1228
1174
  }
@@ -1317,8 +1263,8 @@ export class JsonSchema extends Map {
1317
1263
  }
1318
1264
  return this;
1319
1265
  }
1320
- set(key, value) {
1321
- if (key in this) {
1266
+ set(key, value, force = false) {
1267
+ if (key in this && !force) {
1322
1268
  isFunction(this[key]) && this[key](value);
1323
1269
  }
1324
1270
  else {
@@ -1365,7 +1311,7 @@ export class JsonSchema extends Map {
1365
1311
  const labels = this.get(VendorKeys.GENERIC_LABELS);
1366
1312
  if (this.isClass && !labels) {
1367
1313
  const ancestor = ancestorOf(this.class);
1368
- return ancestor === Object ? undefined : JsonSchema.from(ancestor).getGenericLabels();
1314
+ return ancestor === Object ? undefined : getJsonEntityStore(ancestor).schema.getGenericLabels();
1369
1315
  }
1370
1316
  return this.get(VendorKeys.GENERIC_LABELS);
1371
1317
  }
@@ -1379,7 +1325,7 @@ export class JsonSchema extends Map {
1379
1325
  */
1380
1326
  getRefSchema() {
1381
1327
  if (!this.isLocalSchema && this.isClass) {
1382
- const refSchema = JsonSchema.from(this.class);
1328
+ const refSchema = getJsonEntityStore(this.class).schema;
1383
1329
  if (refSchema !== this) {
1384
1330
  return refSchema;
1385
1331
  }
@@ -1396,9 +1342,10 @@ export class JsonSchema extends Map {
1396
1342
  if (target === "object") {
1397
1343
  this.#target = Object;
1398
1344
  }
1399
- else {
1345
+ else if (typeof target !== "string") {
1400
1346
  this.#target = target;
1401
1347
  }
1348
+ return this;
1402
1349
  }
1403
1350
  isRequiredValue(property, value) {
1404
1351
  if (this.isRequired(property) && [undefined, null, ""].includes(value)) {
@@ -1409,6 +1356,14 @@ export class JsonSchema extends Map {
1409
1356
  }
1410
1357
  return false;
1411
1358
  }
1359
+ toCollection() {
1360
+ this.#isCollection = true;
1361
+ return this;
1362
+ }
1363
+ unsetType() {
1364
+ super.set("type", undefined);
1365
+ return this;
1366
+ }
1412
1367
  setManyOf(keyword, value) {
1413
1368
  let resolved = value
1414
1369
  .filter((o) => {
@@ -1418,7 +1373,7 @@ export class JsonSchema extends Map {
1418
1373
  }
1419
1374
  return true;
1420
1375
  })
1421
- .map((item) => this.mapToJsonSchema(item));
1376
+ .map((item) => this.toSchema(item));
1422
1377
  if (resolved.length === 1 && !(value[0] instanceof JsonSchema) && !this.isNullable) {
1423
1378
  if (!resolved[0].hasDiscriminator) {
1424
1379
  return this.type(value[0]);
@@ -1427,7 +1382,7 @@ export class JsonSchema extends Map {
1427
1382
  if (!children.length) {
1428
1383
  return this.type(value[0]);
1429
1384
  }
1430
- resolved = children.map((item) => this.mapToJsonSchema(item));
1385
+ resolved = children.map((item) => this.toSchema(item));
1431
1386
  }
1432
1387
  super.set(keyword, resolved);
1433
1388
  const jsonSchema = resolved[0];
@@ -1447,21 +1402,21 @@ export class JsonSchema extends Map {
1447
1402
  this.#discriminator = discriminator;
1448
1403
  }
1449
1404
  }
1450
- mapToJsonSchema(item) {
1405
+ toSchema(item) {
1451
1406
  if (isArray(item)) {
1452
- return item.map((item) => this.mapToJsonSchema(item));
1407
+ return item.map((item) => this.toSchema(item));
1453
1408
  }
1454
1409
  if (item && (item.isStore || item.$isJsonDocument || item.isLazyRef)) {
1455
1410
  return item;
1456
1411
  }
1457
1412
  if (item && classOf(item) !== Object && isClass(item)) {
1458
- return JsonEntityStore.from(item).schema;
1413
+ return getJsonEntityStore(item).schema;
1459
1414
  }
1460
1415
  if (isObject(item)) {
1461
- return JsonSchema.from(item);
1416
+ return new JsonSchema(item);
1462
1417
  }
1463
1418
  if (isPrimitiveClass(item) || item === Date || isTemporal(item) || item === null) {
1464
- return JsonSchema.from({ type: item });
1419
+ return new JsonSchema({ type: item });
1465
1420
  }
1466
1421
  return item;
1467
1422
  }
@@ -1489,14 +1444,14 @@ export class JsonSchema extends Map {
1489
1444
  const label = genericLabels[index];
1490
1445
  if (label) {
1491
1446
  if (isEnum(type)) {
1492
- mapping[label] = [JsonSchema.from({ type: "string", enum: Object.values(type) })];
1447
+ mapping[label] = [new JsonSchema({ type: "string", enum: Object.values(type) })];
1493
1448
  }
1494
1449
  else if (nextTypes.length) {
1495
- const nextSchema = this.mapToJsonSchema(type);
1450
+ const nextSchema = this.toSchema(type);
1496
1451
  mapping[label] = [nextSchema, this.mapGenerics(nextSchema, nextTypes)];
1497
1452
  }
1498
1453
  else {
1499
- mapping[label] = [this.mapToJsonSchema(type)];
1454
+ mapping[label] = [this.toSchema(type)];
1500
1455
  }
1501
1456
  }
1502
1457
  return mapping;
@@ -1508,7 +1463,7 @@ export class JsonSchema extends Map {
1508
1463
  return properties;
1509
1464
  }
1510
1465
  return Object.entries(properties).reduce((properties, [key, schema]) => {
1511
- properties[toJsonRegex(key)] = this.mapToJsonSchema(schema);
1466
+ properties[toJsonRegex(key)] = this.toSchema(schema);
1512
1467
  if (schema instanceof JsonSchema) {
1513
1468
  schema.propertyKey(toJsonRegex(key));
1514
1469
  }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @file Automatically generated by @tsed/barrels.
3
+ */
4
+ export * from "./DecoratorContext.js";
5
+ export * from "./Generics.js";
6
+ export * from "./IgnoreCallback.js";
7
+ export * from "./JsonAliasMap.js";
8
+ export * from "./JsonDiscriminator.js";
9
+ export * from "./JsonEntityStore.js";
10
+ export * from "./JsonFormatTypes.js";
11
+ export * from "./JsonHookContext.js";
12
+ export * from "./JsonLazyRef.js";
13
+ export * from "./JsonMap.js";
14
+ export * from "./JsonMedia.js";
15
+ export * from "./JsonOpenSpec.js";
16
+ export * from "./JsonOperation.js";
17
+ export * from "./JsonOperationPathsMap.js";
18
+ export * from "./JsonOperationRoute.js";
19
+ export * from "./JsonParameter.js";
20
+ export * from "./JsonParameterTypes.js";
21
+ export * from "./JsonRequestBody.js";
22
+ export * from "./JsonResponse.js";
23
+ export * from "./JsonSchema.js";
24
+ export * from "./JsonSchemaOptions.js";
25
+ export * from "./SpecTypes.js";
26
+ export * from "./types.js";
@@ -1,10 +1,8 @@
1
1
  import "../components/index.js";
2
- import { getValue, isClass, isPlainObject, nameOf } from "@tsed/core";
3
- import { JsonParameterStore } from "../domain/JsonParameterStore.js";
4
- import { JsonSchema } from "../domain/JsonSchema.js";
5
- import { SpecTypes } from "../domain/SpecTypes.js";
2
+ import { DecoratorTypes, getValue, isClass, isPlainObject, nameOf } from "@tsed/core";
3
+ import { JsonSchema, SpecTypes } from "../domain/index.js";
6
4
  import { execMapper } from "../registries/JsonSchemaMapperContainer.js";
7
- import { getJsonEntityStore } from "./getJsonEntityStore.js";
5
+ import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
8
6
  /**
9
7
  * @ignore
10
8
  */
@@ -34,7 +32,7 @@ function get(model, options) {
34
32
  }
35
33
  const entity = getJsonEntityStore(model);
36
34
  let mapper = "schema";
37
- if (entity instanceof JsonParameterStore) {
35
+ if (entity.is(DecoratorTypes.PARAM)) {
38
36
  options = {
39
37
  ...options,
40
38
  root: true,
@@ -50,7 +48,16 @@ function get(model, options) {
50
48
  }
51
49
  return cache.get(key);
52
50
  }
53
- export function getJsonSchema(model, options = {}) {
51
+ /**
52
+ * Compile a class, parameter store, or `JsonSchema` into a plain JSON schema object.
53
+ *
54
+ * This is an alias of `getJsonSchema(...)`.
55
+ *
56
+ * @param model Class, parameter store, or `JsonSchema` to compile.
57
+ * @param options JSON schema generation options.
58
+ * @returns Compiled JSON schema object.
59
+ */
60
+ export function compile(model, options = {}) {
54
61
  const specType = options.specType || SpecTypes.JSON;
55
62
  options = {
56
63
  endpoint: true,
@@ -64,3 +71,9 @@ export function getJsonSchema(model, options = {}) {
64
71
  };
65
72
  return get(model, options);
66
73
  }
74
+ /**
75
+ * @deprecated Use s.compile() instead
76
+ * @param model
77
+ * @param options
78
+ */
79
+ export const getJsonSchema = compile;
@@ -1,4 +1,4 @@
1
- import { enumsRegistry } from "../registries/enumRegistries.js";
1
+ import { enumsRegistry } from "../registries/enumRegistry.js";
2
2
  import { from } from "./from.js";
3
3
  export function enums(e) {
4
4
  const schema = from().enum(e);
@@ -1,16 +1,39 @@
1
1
  import { isClass } from "@tsed/core";
2
2
  import { JsonSchema } from "../domain/JsonSchema.js";
3
- import { getJsonEntityStore } from "../utils/getJsonEntityStore.js";
3
+ import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
4
4
  export function from(type = Object) {
5
5
  if (isClass(type)) {
6
6
  const { schema } = getJsonEntityStore(type);
7
- schema.properties = function properties(obj) {
8
- Object.entries(obj).forEach(([propertyKey, propSchema]) => {
9
- getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);
10
- });
11
- return this;
12
- };
13
- return schema;
7
+ return schema.clone();
14
8
  }
15
- return JsonSchema.from({ type });
9
+ return new JsonSchema({ type });
10
+ }
11
+ /**
12
+ * Get the shared schema instance attached to a class.
13
+ *
14
+ * Contrary to @@from@@, `get()` returns the schema stored in the class metadata.
15
+ * Mutating the returned instance updates the class-level schema definition and
16
+ * therefore affects every consumer of that class schema.
17
+ *
18
+ * This helper is intended for low-level or internal patching scenarios where the
19
+ * source schema must be updated in place.
20
+ *
21
+ * ```typescript
22
+ * get(UserModel).properties({
23
+ * name: string()
24
+ * });
25
+ * ```
26
+ *
27
+ * @param type The class owning the shared schema metadata.
28
+ * @returns The shared `JsonSchema` instance for the class.
29
+ */
30
+ export function get(type) {
31
+ const { schema } = getJsonEntityStore(type);
32
+ schema.properties = function properties(obj) {
33
+ Object.entries(obj).forEach(([propertyKey, propSchema]) => {
34
+ getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);
35
+ });
36
+ return this;
37
+ };
38
+ return schema;
16
39
  }
@@ -0,0 +1,9 @@
1
+ import { from } from "./from.js";
2
+ export function generic(type = Object) {
3
+ function of(...generics) {
4
+ return from(type).genericOf(...generics);
5
+ }
6
+ return {
7
+ of
8
+ };
9
+ }
@@ -1,14 +1,20 @@
1
+ import { array, map, record, set } from "./collection.js";
2
+ import { date, datetime, time } from "./date.js";
3
+ import { from, get } from "./from.js";
4
+ import { getJsonEntityStore, getJsonMethodStore } from "../registries/JsonEntitiesContainer.js";
1
5
  import { allOf } from "./allOf.js";
2
6
  import { any } from "./any.js";
3
7
  import { anyOf } from "./anyOf.js";
4
8
  import { boolean } from "./boolean.js";
5
- import { array, map, record, set } from "./collection.js";
6
- import { date, datetime, time } from "./date.js";
9
+ import { compile } from "./compile.js";
10
+ import { compileSpec } from "./oas/compileSpec.js";
7
11
  import { email } from "./email.js";
8
12
  import { enums } from "./enums.js";
9
- import { from } from "./from.js";
13
+ import { generic } from "./generic.js";
10
14
  import { integer } from "./integer.js";
11
15
  import { lazyRef } from "./lazyRef.js";
16
+ import { mergeSchema } from "../utils/mergeSchema.js";
17
+ import { mergeSpec } from "./oas/mergeSpec.js";
12
18
  import { number } from "./number.js";
13
19
  import { object } from "./object.js";
14
20
  import { oneOf } from "./oneOf.js";
@@ -43,5 +49,20 @@ export const s = {
43
49
  $ref: ref,
44
50
  string,
45
51
  uri,
46
- url
52
+ url,
53
+ generic,
54
+ get,
55
+ store: Object.assign(getJsonEntityStore, {
56
+ get: getJsonEntityStore,
57
+ method: getJsonMethodStore
58
+ }),
59
+ schema: {
60
+ compile,
61
+ merge: mergeSchema
62
+ },
63
+ compile,
64
+ oas: Object.assign(compileSpec, {
65
+ compile: compileSpec,
66
+ merge: mergeSpec
67
+ })
47
68
  };
@@ -1,11 +1,11 @@
1
- import { JsonEntityStore } from "../domain/JsonEntityStore.js";
2
- import { JsonLazyRef } from "../domain/JsonLazyRef.js";
1
+ import { JsonLazyRef } from "../domain/index.js";
2
+ import { getJsonEntityStore } from "../registries/JsonEntitiesContainer.js";
3
3
  export function lazyRef(cb) {
4
4
  try {
5
5
  // solve issue with a self referenced model
6
6
  if (cb()) {
7
7
  // type is already accessible
8
- return JsonEntityStore.from(cb()).schema;
8
+ return getJsonEntityStore(cb()).schema;
9
9
  }
10
10
  }
11
11
  catch (er) { }
@@ -0,0 +1,9 @@
1
+ import { generateSpec } from "./generateSpec.js";
2
+ import { getSpec } from "./getSpec.js";
3
+ import { isPlainObject } from "@tsed/core";
4
+ export function compileSpec(modelOrOptions, options) {
5
+ if (!isPlainObject(modelOrOptions) || options) {
6
+ return getSpec(modelOrOptions, options);
7
+ }
8
+ return generateSpec(modelOrOptions);
9
+ }
@@ -1,7 +1,7 @@
1
- import { getValue } from "@tsed/core";
2
- import { SpecTypes } from "../domain/SpecTypes.js";
3
1
  import { getSpec } from "./getSpec.js";
2
+ import { SpecTypes } from "../../domain/SpecTypes.js";
4
3
  import { getSpecTypeFromSpec } from "./getSpecType.js";
4
+ import { getValue } from "@tsed/core";
5
5
  import { mapOpenSpec } from "./mapOpenSpec.js";
6
6
  import { mergeSpec } from "./mergeSpec.js";
7
7
  import { transformToOS2 } from "./transformToOS2.js";
@@ -1,9 +1,9 @@
1
1
  import { cleanObject, isArray } from "@tsed/core";
2
- import { SpecTypes } from "../domain/SpecTypes.js";
3
- import { execMapper } from "../registries/JsonSchemaMapperContainer.js";
4
- import { getJsonEntityStore } from "./getJsonEntityStore.js";
2
+ import { SpecTypes } from "../../domain/index.js";
3
+ import { execMapper } from "../../registries/JsonSchemaMapperContainer.js";
4
+ import { getJsonEntityStore } from "../../registries/JsonEntitiesContainer.js";
5
5
  import { mergeSpec } from "./mergeSpec.js";
6
- import { operationIdFormatter } from "./operationIdFormatter.js";
6
+ import { operationIdFormatter } from "../../utils/operationIdFormatter.js";
7
7
  /**
8
8
  * @ignore
9
9
  */
@@ -1,4 +1,4 @@
1
- import { SpecTypes } from "../domain/SpecTypes.js";
1
+ import { SpecTypes } from "../../domain/index.js";
2
2
  /**
3
3
  * @ignore
4
4
  * @param version