@skmtc/core 0.0.443 → 0.0.445

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 (89) hide show
  1. package/esm/context/ParseContext.d.ts +3 -1
  2. package/esm/context/ParseContext.d.ts.map +1 -1
  3. package/esm/context/ParseContext.js +11 -13
  4. package/esm/oas/array/toArray.js +1 -1
  5. package/esm/oas/boolean/toBoolean.js +1 -1
  6. package/esm/oas/components/toComponentsV3.js +1 -1
  7. package/esm/oas/contact/toContactV3.d.ts.map +1 -1
  8. package/esm/oas/contact/toContactV3.js +1 -2
  9. package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  10. package/esm/oas/document/toDocumentFieldsV3.js +1 -2
  11. package/esm/oas/example/toExamplesV3.js +1 -1
  12. package/esm/oas/header/toHeadersV3.js +1 -1
  13. package/esm/oas/info/toInfoV3.d.ts.map +1 -1
  14. package/esm/oas/info/toInfoV3.js +1 -2
  15. package/esm/oas/integer/toInteger.js +1 -1
  16. package/esm/oas/intersection/toIntersection.js +1 -1
  17. package/esm/oas/license/toLicenseV3.d.ts.map +1 -1
  18. package/esm/oas/license/toLicenseV3.js +1 -2
  19. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  20. package/esm/oas/mediaType/toMediaTypeItemV3.js +1 -2
  21. package/esm/oas/number/toNumber.d.ts.map +1 -1
  22. package/esm/oas/number/toNumber.js +1 -2
  23. package/esm/oas/object/toObject.d.ts.map +1 -1
  24. package/esm/oas/object/toObject.js +9 -2
  25. package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
  26. package/esm/oas/operation/toOperationsV3.js +9 -1
  27. package/esm/oas/parameter/toParameterV3.js +1 -2
  28. package/esm/oas/pathItem/toPathItemV3.js +1 -1
  29. package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  30. package/esm/oas/requestBody/toRequestBodiesV3.js +1 -2
  31. package/esm/oas/response/toResponseV3.d.ts.map +1 -1
  32. package/esm/oas/response/toResponseV3.js +1 -2
  33. package/esm/oas/schema/toSchemasV3.js +3 -3
  34. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +1 -2
  35. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  36. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.js +1 -4
  37. package/esm/oas/string/toString.d.ts.map +1 -1
  38. package/esm/oas/string/toString.js +4 -2
  39. package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
  40. package/esm/oas/tag/toTagsV3.js +1 -2
  41. package/esm/oas/union/toUnion.d.ts.map +1 -1
  42. package/esm/oas/union/toUnion.js +1 -2
  43. package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
  44. package/esm/oas/unknown/toUnknown.js +1 -2
  45. package/package.json +1 -1
  46. package/script/context/ParseContext.d.ts +3 -1
  47. package/script/context/ParseContext.d.ts.map +1 -1
  48. package/script/context/ParseContext.js +11 -13
  49. package/script/oas/array/toArray.js +1 -1
  50. package/script/oas/boolean/toBoolean.js +1 -1
  51. package/script/oas/components/toComponentsV3.js +1 -1
  52. package/script/oas/contact/toContactV3.d.ts.map +1 -1
  53. package/script/oas/contact/toContactV3.js +1 -2
  54. package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  55. package/script/oas/document/toDocumentFieldsV3.js +1 -2
  56. package/script/oas/example/toExamplesV3.js +1 -1
  57. package/script/oas/header/toHeadersV3.js +1 -1
  58. package/script/oas/info/toInfoV3.d.ts.map +1 -1
  59. package/script/oas/info/toInfoV3.js +1 -2
  60. package/script/oas/integer/toInteger.js +1 -1
  61. package/script/oas/intersection/toIntersection.js +1 -1
  62. package/script/oas/license/toLicenseV3.d.ts.map +1 -1
  63. package/script/oas/license/toLicenseV3.js +1 -2
  64. package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  65. package/script/oas/mediaType/toMediaTypeItemV3.js +1 -2
  66. package/script/oas/number/toNumber.d.ts.map +1 -1
  67. package/script/oas/number/toNumber.js +1 -2
  68. package/script/oas/object/toObject.d.ts.map +1 -1
  69. package/script/oas/object/toObject.js +9 -2
  70. package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
  71. package/script/oas/operation/toOperationsV3.js +9 -1
  72. package/script/oas/parameter/toParameterV3.js +1 -2
  73. package/script/oas/pathItem/toPathItemV3.js +1 -1
  74. package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  75. package/script/oas/requestBody/toRequestBodiesV3.js +1 -2
  76. package/script/oas/response/toResponseV3.d.ts.map +1 -1
  77. package/script/oas/response/toResponseV3.js +1 -2
  78. package/script/oas/schema/toSchemasV3.js +3 -3
  79. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +1 -2
  80. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  81. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.js +1 -4
  82. package/script/oas/string/toString.d.ts.map +1 -1
  83. package/script/oas/string/toString.js +4 -2
  84. package/script/oas/tag/toTagsV3.d.ts.map +1 -1
  85. package/script/oas/tag/toTagsV3.js +1 -2
  86. package/script/oas/union/toUnion.d.ts.map +1 -1
  87. package/script/oas/union/toUnion.js +1 -2
  88. package/script/oas/unknown/toUnknown.d.ts.map +1 -1
  89. package/script/oas/unknown/toUnknown.js +1 -2
@@ -13,6 +13,7 @@ export type ParseReturn = {
13
13
  };
14
14
  type RegisterExtensionArgs = {
15
15
  type: string;
16
+ stackTrail: string[];
16
17
  extensionFields: Record<string, unknown>;
17
18
  };
18
19
  export declare class ParseContext {
@@ -20,11 +21,12 @@ export declare class ParseContext {
20
21
  schema: string;
21
22
  logger: log.Logger;
22
23
  oasDocument: OasDocument;
24
+ stackTrail: StackTrail;
23
25
  extentions: Record<string, unknown>;
24
26
  constructor({ schema, logger, stackTrail }: ConstructorArgs);
25
27
  parse(): OasDocument;
26
28
  trace<T>(token: string | string[], fn: () => T): T;
27
- registerExtension({ extensionFields, type }: RegisterExtensionArgs): void;
29
+ registerExtension({ extensionFields, stackTrail, type }: RegisterExtensionArgs): void;
28
30
  logSkippedFields(skipped: Record<string, unknown>): void;
29
31
  }
30
32
  export declare const parseSchema: (schema: string) => OpenAPIV3.Document<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,wCAAwC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,qBAAa,YAAY;;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IAExB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAEvB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAQ3D,KAAK;IAeL,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAiBlD,iBAAiB,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,qBAAqB,GAAG,IAAI;IAMzE,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAUlD;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
1
+ {"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,wCAAwC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,qBAAa,YAAY;;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAEvB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAQ3D,KAAK;IAeL,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAiBlD,iBAAiB,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,qBAAqB,GAAG,IAAI;IAIrF,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAUlD;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
@@ -1,15 +1,9 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
1
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
2
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
5
  };
12
- var _ParseContext_instances, _ParseContext_stackTrail, _ParseContext_parseSchema, _ParseContext_parseDocument;
6
+ var _ParseContext_instances, _ParseContext_parseSchema, _ParseContext_parseDocument;
13
7
  import * as Sentry from '@sentry/deno';
14
8
  import { parse as parseYaml } from '../deps/jsr.io/@std/yaml/0.215.0/mod.js';
15
9
  import { toDocumentFieldsV3 } from '../oas/document/toDocumentFieldsV3.js';
@@ -37,7 +31,12 @@ export class ParseContext {
37
31
  writable: true,
38
32
  value: void 0
39
33
  });
40
- _ParseContext_stackTrail.set(this, void 0);
34
+ Object.defineProperty(this, "stackTrail", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: void 0
39
+ });
41
40
  Object.defineProperty(this, "extentions", {
42
41
  enumerable: true,
43
42
  configurable: true,
@@ -46,7 +45,7 @@ export class ParseContext {
46
45
  });
47
46
  this.schema = schema;
48
47
  this.logger = logger;
49
- __classPrivateFieldSet(this, _ParseContext_stackTrail, stackTrail, "f");
48
+ this.stackTrail = stackTrail;
50
49
  this.extentions = {};
51
50
  this.oasDocument = new OasDocument();
52
51
  }
@@ -55,10 +54,9 @@ export class ParseContext {
55
54
  return __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseDocument).call(this, documentObject);
56
55
  }
57
56
  trace(token, fn) {
58
- return tracer(__classPrivateFieldGet(this, _ParseContext_stackTrail, "f"), token, fn);
57
+ return tracer(this.stackTrail, token, fn);
59
58
  }
60
- registerExtension({ extensionFields, type }) {
61
- const { stackTrail } = __classPrivateFieldGet(this, _ParseContext_stackTrail, "f").slice(1);
59
+ registerExtension({ extensionFields, stackTrail, type }) {
62
60
  setWith(this.extentions, stackTrail.concat('__x__'), { type, extensionFields }, Object);
63
61
  }
64
62
  logSkippedFields(skipped) {
@@ -71,7 +69,7 @@ export class ParseContext {
71
69
  });
72
70
  }
73
71
  }
74
- _ParseContext_stackTrail = new WeakMap(), _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
72
+ _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
75
73
  const documentObject = Sentry.startSpan({ name: 'Parse string schema to object' }, () => parseSchema(this.schema));
76
74
  return documentObject;
77
75
  }, _ParseContext_parseDocument = function _ParseContext_parseDocument(documentObject) {
@@ -3,7 +3,7 @@ import { toSchemaV3 } from '../schema/toSchemasV3.js';
3
3
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
4
4
  export const toArray = ({ value, context }) => {
5
5
  const { type: _type, items, title, description, nullable, uniqueItems, example, ...skipped } = value;
6
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'array' });
6
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
7
7
  if (uniqueItems === true) {
8
8
  throw new Error('uniqueItems is not supported');
9
9
  }
@@ -2,7 +2,7 @@ import { OasBoolean } from './Boolean.js';
2
2
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
3
3
  export const toBoolean = ({ value, context }) => {
4
4
  const { type: _type, title, description, nullable, example, ...skipped } = value;
5
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'boolean' });
5
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
6
6
  return new OasBoolean({
7
7
  nullable,
8
8
  title,
@@ -11,7 +11,7 @@ export const toComponentsV3 = ({ components, context }) => {
11
11
  return undefined;
12
12
  }
13
13
  const { schemas, responses, parameters, examples, requestBodies, headers, ...skipped } = components;
14
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'components' });
14
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
15
15
  const fields = {
16
16
  schemas: context.trace('schemas', () => toOptionalSchemasV3({ schemas, context })),
17
17
  responses: context.trace('responses', () => toOptionalResponsesV3({ responses, context })),
@@ -1 +1 @@
1
- {"version":3,"file":"toContactV3.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/toContactV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAeF,CAAA"}
1
+ {"version":3,"file":"toContactV3.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/toContactV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAcF,CAAA"}
@@ -4,8 +4,7 @@ export const toContactV3 = (contact, context) => {
4
4
  const { name, url, email, ...skipped } = contact;
5
5
  const extensionFields = toSpecificationExtensionsV3({
6
6
  skipped,
7
- context,
8
- type: 'contact'
7
+ context
9
8
  });
10
9
  return new OasContact({
11
10
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,KAAK,gBAAgB,GAAG;IACtB,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,gCAG5B,gBAAgB,KAAG,cAmBrB,CAAA"}
1
+ {"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,KAAK,gBAAgB,GAAG;IACtB,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,gCAG5B,gBAAgB,KAAG,cAkBrB,CAAA"}
@@ -7,8 +7,7 @@ export const toDocumentFieldsV3 = ({ documentObject, context }) => {
7
7
  const { openapi, info, paths, components, tags, ...skipped } = documentObject;
8
8
  const extensionFields = toSpecificationExtensionsV3({
9
9
  skipped,
10
- context,
11
- type: 'document'
10
+ context
12
11
  });
13
12
  const fields = {
14
13
  openapi,
@@ -33,7 +33,7 @@ export const toExampleV3 = ({ example, context }) => {
33
33
  return toRefV31({ ref: example, refType: 'example', context });
34
34
  }
35
35
  const { summary, description, value, ...skipped } = example;
36
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'example' });
36
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
37
37
  return new OasExample({
38
38
  summary,
39
39
  description,
@@ -18,7 +18,7 @@ const toHeaderV3 = ({ header, context }) => {
18
18
  return toRefV31({ ref: header, refType: 'header', context });
19
19
  }
20
20
  const { description, required, deprecated, schema, example, examples, content, ...skipped } = header;
21
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'header' });
21
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
22
22
  const fields = {
23
23
  description,
24
24
  required,
@@ -1 +1 @@
1
- {"version":3,"file":"toInfoV3.d.ts","sourceRoot":"","sources":["../../../src/oas/info/toInfoV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKnC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,UAAU,CAAA;IAC1B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,OAkB1D,CAAA"}
1
+ {"version":3,"file":"toInfoV3.d.ts","sourceRoot":"","sources":["../../../src/oas/info/toInfoV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKnC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,UAAU,CAAA;IAC1B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,OAiB1D,CAAA"}
@@ -6,8 +6,7 @@ export const toInfoV3 = ({ info, context }) => {
6
6
  const { title, description, termsOfService, contact, license, version, ...skipped } = info;
7
7
  const extensionFields = toSpecificationExtensionsV3({
8
8
  skipped,
9
- context,
10
- type: 'info'
9
+ context
11
10
  });
12
11
  return new OasInfo({
13
12
  title,
@@ -3,7 +3,7 @@ import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecif
3
3
  import { oasIntegerData } from './integer-types.js';
4
4
  export const toInteger = ({ value, context }) => {
5
5
  const { type: _type, title, description, nullable, format, enum: enums, example, ...skipped } = oasIntegerData.parse(value);
6
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'integer' });
6
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
7
7
  return new OasInteger({
8
8
  title,
9
9
  description,
@@ -4,7 +4,7 @@ import { toSchemaV3 } from '../schema/toSchemasV3.js';
4
4
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
5
5
  export const toIntersection = ({ value, members, context }) => {
6
6
  const { discriminator, title, description, nullable, ...skipped } = value;
7
- const extensionFields = toSpecificationExtensionsV3({ skipped, context, type: 'intersection' });
7
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
8
8
  return new OasIntersection({
9
9
  title,
10
10
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toLicenseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/license/toLicenseV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAcF,CAAA"}
1
+ {"version":3,"file":"toLicenseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/license/toLicenseV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAaF,CAAA"}
@@ -4,8 +4,7 @@ export const toLicenseV3 = (license, context) => {
4
4
  const { name, url, ...skipped } = license;
5
5
  const extensionFields = toSpecificationExtensionsV3({
6
6
  skipped,
7
- context,
8
- type: 'license'
7
+ context
9
8
  });
10
9
  return new OasLicense({
11
10
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"toMediaTypeItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/toMediaTypeItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,SAAS,CAAC,eAAe,CAAA;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAI3B,qBAAqB,KAAG,YAwB1B,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IAClD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,yBAG5B,sBAAsB,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAatD,CAAA;AAED,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,0BAA0B,yBAGpC,8BAA8B,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAMlE,CAAA"}
1
+ {"version":3,"file":"toMediaTypeItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/toMediaTypeItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,SAAS,CAAC,eAAe,CAAA;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAI3B,qBAAqB,KAAG,YAuB1B,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IAClD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,yBAG5B,sBAAsB,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAatD,CAAA;AAED,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,0BAA0B,yBAGpC,8BAA8B,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAMlE,CAAA"}
@@ -6,8 +6,7 @@ export const toMediaTypeItemV3 = ({ mediaTypeItem, mediaType, context }) => {
6
6
  const { schema, example, examples, ...skipped } = mediaTypeItem;
7
7
  const extensionFields = toSpecificationExtensionsV3({
8
8
  skipped,
9
- context,
10
- type: 'media-type'
9
+ context
11
10
  });
12
11
  const fields = {
13
12
  mediaType,
@@ -1 +1 @@
1
- {"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAgB3D,CAAA"}
1
+ {"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAe3D,CAAA"}
@@ -4,8 +4,7 @@ export const toNumber = ({ value, context }) => {
4
4
  const { type: _type, title, description, nullable, example, ...skipped } = value;
5
5
  const extensionFields = toSpecificationExtensionsV3({
6
6
  skipped,
7
- context,
8
- type: 'number'
7
+ context
9
8
  });
10
9
  return new OasNumber({
11
10
  title,
@@ -1 +1 @@
1
- {"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAA;AAK7D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAsC3D,CAAA"}
1
+ {"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAA;AAK7D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA+C3D,CAAA"}
@@ -6,9 +6,16 @@ export const toObject = ({ value, context }) => {
6
6
  const { type: _type, title, description, properties, required, additionalProperties, nullable, example, ...skipped } = value;
7
7
  const extensionFields = toSpecificationExtensionsV3({
8
8
  skipped,
9
- context,
10
- type: 'object'
9
+ context
11
10
  });
11
+ if (extensionFields && Object.keys(extensionFields).length > 0) {
12
+ const last = context.stackTrail.stackTrail.slice(-1);
13
+ context.registerExtension({
14
+ extensionFields,
15
+ type: 'model',
16
+ stackTrail: ['models', last.toString()]
17
+ });
18
+ }
12
19
  const fields = {
13
20
  title,
14
21
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAOD,eAAO,MAAM,aAAa,0CAIvB,iBAAiB,KAAG,YA6BtB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,uBAAwB,kBAAkB,KAAG,YAAY,EAsDnF,CAAA"}
1
+ {"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAOD,eAAO,MAAM,aAAa,0CAIvB,iBAAiB,KAAG,YAuCtB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,uBAAwB,kBAAkB,KAAG,YAAY,EAsDnF,CAAA"}
@@ -8,6 +8,14 @@ import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecif
8
8
  export const toOperationV3 = ({ operation, operationInfo, context }) => {
9
9
  const { method, path, pathItem } = operationInfo;
10
10
  const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, ...skipped } = operation;
11
+ const extensionFields = toSpecificationExtensionsV3({ skipped, context });
12
+ if (extensionFields && Object.keys(extensionFields).length > 0) {
13
+ context.registerExtension({
14
+ extensionFields,
15
+ type: 'operation',
16
+ stackTrail: ['operations', path, method]
17
+ });
18
+ }
11
19
  return new OasOperation({
12
20
  pathItem,
13
21
  path,
@@ -20,7 +28,7 @@ export const toOperationV3 = ({ operation, operationInfo, context }) => {
20
28
  requestBody: context.trace('requestBody', () => toRequestBodyV3({ requestBody, context })),
21
29
  responses: context.trace('responses', () => toResponsesV3({ responses, context })),
22
30
  deprecated,
23
- extensionFields: toSpecificationExtensionsV3({ skipped, context, type: 'operation' })
31
+ extensionFields
24
32
  });
25
33
  };
26
34
  export const toOperationsV3 = ({ paths, context }) => {
@@ -33,8 +33,7 @@ const toParameterV3 = ({ parameter, context }) => {
33
33
  const { name, in: location, description, required, deprecated, allowEmptyValue, allowReserved, schema, example, examples, content, style, explode, ...skipped } = parameter;
34
34
  const extensionFields = toSpecificationExtensionsV3({
35
35
  skipped,
36
- context,
37
- type: 'parameter'
36
+ context
38
37
  });
39
38
  const parsedLocation = oasParameterLocation.parse(location);
40
39
  if (parsedLocation === 'path' && !required) {
@@ -7,6 +7,6 @@ export const toPathItemV3 = ({ pathItem, context }) => {
7
7
  summary,
8
8
  description,
9
9
  parameters: context.trace('parameters', () => toParameterListV3({ parameters, context })),
10
- extensionFields: toSpecificationExtensionsV3({ skipped, context, type: 'pathItem' })
10
+ extensionFields: toSpecificationExtensionsV3({ skipped, context })
11
11
  });
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,6BAGzB,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA2BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,+BAG3B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAYnF,CAAA"}
1
+ {"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,6BAGzB,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA0BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,+BAG3B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAYnF,CAAA"}
@@ -13,8 +13,7 @@ export const toRequestBodyV3 = ({ requestBody, context }) => {
13
13
  const { description, content, required, ...skipped } = requestBody;
14
14
  const extensionFields = toSpecificationExtensionsV3({
15
15
  skipped,
16
- context,
17
- type: 'requestBody'
16
+ context
18
17
  });
19
18
  const fields = {
20
19
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,2BAGvB,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAMrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,2BAG/B,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAqBpD,CAAA"}
1
+ {"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,2BAGvB,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAMrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,2BAG/B,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAoBpD,CAAA"}
@@ -22,8 +22,7 @@ export const toResponseV3 = ({ response, context }) => {
22
22
  const { description, headers, content, ...skipped } = response;
23
23
  const extensionFields = toSpecificationExtensionsV3({
24
24
  skipped,
25
- context,
26
- type: 'response'
25
+ context
27
26
  });
28
27
  const fields = {
29
28
  description,
@@ -26,9 +26,9 @@ export const toSchemaV3 = ({ schema, context }) => {
26
26
  return toRefV31({ ref: schema, refType: 'schema', context });
27
27
  }
28
28
  // Workaround for dodgy Reapit schema
29
- if (schema.type !== 'array' && 'optional' in schema && schema.optional === true) {
30
- schema.nullable = true;
31
- }
29
+ // if (schema.type !== 'array' && 'optional' in schema && schema.optional === true) {
30
+ // schema.nullable = true
31
+ // }
32
32
  return match(schema)
33
33
  .with({ oneOf: P.array() }, ({ oneOf: members, ...value }) => {
34
34
  // if (members.length === 1) {
@@ -1,9 +1,8 @@
1
1
  import type { ParseContext } from '../../context/ParseContext.js';
2
2
  type ToSpecificationExtensionsV3Args = {
3
- type: string;
4
3
  skipped: Record<string, unknown>;
5
4
  context: ParseContext;
6
5
  };
7
- export declare const toSpecificationExtensionsV3: ({ type, skipped: s, context }: ToSpecificationExtensionsV3Args) => Record<string, unknown> | undefined;
6
+ export declare const toSpecificationExtensionsV3: ({ skipped: s, context }: ToSpecificationExtensionsV3Args) => Record<string, unknown> | undefined;
8
7
  export {};
9
8
  //# sourceMappingURL=toSpecificationExtensionsV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toSpecificationExtensionsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/specificationExtensions/toSpecificationExtensionsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,KAAK,+BAA+B,GAAG;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,2BAA2B,kCAIrC,+BAA+B,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAgC9D,CAAA"}
1
+ {"version":3,"file":"toSpecificationExtensionsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/specificationExtensions/toSpecificationExtensionsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,KAAK,+BAA+B,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,2BAA2B,4BAGrC,+BAA+B,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SA4B9D,CAAA"}
@@ -1,4 +1,4 @@
1
- export const toSpecificationExtensionsV3 = ({ type, skipped: s, context }) => {
1
+ export const toSpecificationExtensionsV3 = ({ skipped: s, context }) => {
2
2
  const { skipped, extensionFields } = Object.entries(s).reduce((acc, [key, value]) => {
3
3
  if (!key.startsWith('x-')) {
4
4
  return acc;
@@ -14,8 +14,5 @@ export const toSpecificationExtensionsV3 = ({ type, skipped: s, context }) => {
14
14
  };
15
15
  }, { skipped: s, extensionFields: undefined });
16
16
  context.logSkippedFields(skipped);
17
- if (extensionFields && Object.keys(extensionFields).length > 0) {
18
- context.registerExtension({ extensionFields, type });
19
- }
20
17
  return extensionFields;
21
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/oas/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA+B3D,CAAA"}
1
+ {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/oas/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAkC3D,CAAA"}
@@ -5,9 +5,11 @@ export const toString = ({ value, context }) => {
5
5
  const { type: _type, title, description, enum: enums, nullable, example, format, maxLength, minLength, ...skipped } = oasStringData.parse(value);
6
6
  const extensionFields = toSpecificationExtensionsV3({
7
7
  skipped,
8
- context,
9
- type: 'string'
8
+ context
10
9
  });
10
+ // if (extensionFields && Object.keys(extensionFields).length > 0) {
11
+ // context.registerExtension({ extensionFields, type: 'string' })
12
+ // }
11
13
  return new OasString({
12
14
  title,
13
15
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toTagsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/tag/toTagsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAIjC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,GAAG,SAAS,CAAA;IACvC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,MAAM,EAAE,GAAG,SAMrE,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,SAAS,CAAC,SAAS,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,qBAAsB,WAAW,KAAG,MAgBvD,CAAA"}
1
+ {"version":3,"file":"toTagsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/tag/toTagsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAIjC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,GAAG,SAAS,CAAA;IACvC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,MAAM,EAAE,GAAG,SAMrE,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,SAAS,CAAC,SAAS,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,qBAAsB,WAAW,KAAG,MAevD,CAAA"}
@@ -10,8 +10,7 @@ export const toTagV3 = ({ tag, context }) => {
10
10
  const { name, description, ...skipped } = tag;
11
11
  const extensionFields = toSpecificationExtensionsV3({
12
12
  skipped,
13
- context,
14
- type: 'tag'
13
+ context
15
14
  });
16
15
  const fields = {
17
16
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../src/oas/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,gCAAiC,WAAW,KAAG,QAsBlE,CAAA"}
1
+ {"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../src/oas/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,gCAAiC,WAAW,KAAG,QAqBlE,CAAA"}
@@ -6,8 +6,7 @@ export const toUnion = ({ value, members, context }) => {
6
6
  const { discriminator, title, description, nullable, example, ...skipped } = value;
7
7
  const extensionFields = toSpecificationExtensionsV3({
8
8
  skipped,
9
- context,
10
- type: 'union'
9
+ context
11
10
  });
12
11
  return new OasUnion({
13
12
  title,
@@ -1 +1 @@
1
- {"version":3,"file":"toUnknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/toUnknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IAErC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAe7D,CAAA"}
1
+ {"version":3,"file":"toUnknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/toUnknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IAErC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAc7D,CAAA"}
@@ -4,8 +4,7 @@ export const toUnknown = ({ value, context }) => {
4
4
  const { type: _type, title, description, example, ...skipped } = value;
5
5
  const extensionFields = toSpecificationExtensionsV3({
6
6
  skipped,
7
- context,
8
- type: 'unknown'
7
+ context
9
8
  });
10
9
  return new OasUnknown({
11
10
  title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.443",
3
+ "version": "0.0.445",
4
4
  "main": "./script/mod.js",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {
@@ -13,6 +13,7 @@ export type ParseReturn = {
13
13
  };
14
14
  type RegisterExtensionArgs = {
15
15
  type: string;
16
+ stackTrail: string[];
16
17
  extensionFields: Record<string, unknown>;
17
18
  };
18
19
  export declare class ParseContext {
@@ -20,11 +21,12 @@ export declare class ParseContext {
20
21
  schema: string;
21
22
  logger: log.Logger;
22
23
  oasDocument: OasDocument;
24
+ stackTrail: StackTrail;
23
25
  extentions: Record<string, unknown>;
24
26
  constructor({ schema, logger, stackTrail }: ConstructorArgs);
25
27
  parse(): OasDocument;
26
28
  trace<T>(token: string | string[], fn: () => T): T;
27
- registerExtension({ extensionFields, type }: RegisterExtensionArgs): void;
29
+ registerExtension({ extensionFields, stackTrail, type }: RegisterExtensionArgs): void;
28
30
  logSkippedFields(skipped: Record<string, unknown>): void;
29
31
  }
30
32
  export declare const parseSchema: (schema: string) => OpenAPIV3.Document<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,wCAAwC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,qBAAa,YAAY;;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IAExB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAEvB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAQ3D,KAAK;IAeL,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAiBlD,iBAAiB,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,qBAAqB,GAAG,IAAI;IAMzE,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAUlD;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
1
+ {"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,wCAAwC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAIjD,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,qBAAa,YAAY;;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAEvB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAQ3D,KAAK;IAeL,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAiBlD,iBAAiB,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,qBAAqB,GAAG,IAAI;IAIrF,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAUlD;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
@@ -22,18 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
26
- if (kind === "m") throw new TypeError("Private method is not writable");
27
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
28
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
29
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
30
- };
31
25
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
32
26
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
33
27
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
34
28
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
35
29
  };
36
- var _ParseContext_instances, _ParseContext_stackTrail, _ParseContext_parseSchema, _ParseContext_parseDocument;
30
+ var _ParseContext_instances, _ParseContext_parseSchema, _ParseContext_parseDocument;
37
31
  Object.defineProperty(exports, "__esModule", { value: true });
38
32
  exports.parseSchema = exports.ParseContext = void 0;
39
33
  const Sentry = __importStar(require("@sentry/deno"));
@@ -63,7 +57,12 @@ class ParseContext {
63
57
  writable: true,
64
58
  value: void 0
65
59
  });
66
- _ParseContext_stackTrail.set(this, void 0);
60
+ Object.defineProperty(this, "stackTrail", {
61
+ enumerable: true,
62
+ configurable: true,
63
+ writable: true,
64
+ value: void 0
65
+ });
67
66
  Object.defineProperty(this, "extentions", {
68
67
  enumerable: true,
69
68
  configurable: true,
@@ -72,7 +71,7 @@ class ParseContext {
72
71
  });
73
72
  this.schema = schema;
74
73
  this.logger = logger;
75
- __classPrivateFieldSet(this, _ParseContext_stackTrail, stackTrail, "f");
74
+ this.stackTrail = stackTrail;
76
75
  this.extentions = {};
77
76
  this.oasDocument = new Document_js_1.OasDocument();
78
77
  }
@@ -81,10 +80,9 @@ class ParseContext {
81
80
  return __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseDocument).call(this, documentObject);
82
81
  }
83
82
  trace(token, fn) {
84
- return (0, tracer_js_1.tracer)(__classPrivateFieldGet(this, _ParseContext_stackTrail, "f"), token, fn);
83
+ return (0, tracer_js_1.tracer)(this.stackTrail, token, fn);
85
84
  }
86
- registerExtension({ extensionFields, type }) {
87
- const { stackTrail } = __classPrivateFieldGet(this, _ParseContext_stackTrail, "f").slice(1);
85
+ registerExtension({ extensionFields, stackTrail, type }) {
88
86
  (0, lodash_es_1.setWith)(this.extentions, stackTrail.concat('__x__'), { type, extensionFields }, Object);
89
87
  }
90
88
  logSkippedFields(skipped) {
@@ -98,7 +96,7 @@ class ParseContext {
98
96
  }
99
97
  }
100
98
  exports.ParseContext = ParseContext;
101
- _ParseContext_stackTrail = new WeakMap(), _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
99
+ _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
102
100
  const documentObject = Sentry.startSpan({ name: 'Parse string schema to object' }, () => (0, exports.parseSchema)(this.schema));
103
101
  return documentObject;
104
102
  }, _ParseContext_parseDocument = function _ParseContext_parseDocument(documentObject) {
@@ -6,7 +6,7 @@ const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
6
6
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
7
7
  const toArray = ({ value, context }) => {
8
8
  const { type: _type, items, title, description, nullable, uniqueItems, example, ...skipped } = value;
9
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'array' });
9
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
10
10
  if (uniqueItems === true) {
11
11
  throw new Error('uniqueItems is not supported');
12
12
  }
@@ -5,7 +5,7 @@ const Boolean_js_1 = require("./Boolean.js");
5
5
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
6
6
  const toBoolean = ({ value, context }) => {
7
7
  const { type: _type, title, description, nullable, example, ...skipped } = value;
8
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'boolean' });
8
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
9
9
  return new Boolean_js_1.OasBoolean({
10
10
  nullable,
11
11
  title,
@@ -14,7 +14,7 @@ const toComponentsV3 = ({ components, context }) => {
14
14
  return undefined;
15
15
  }
16
16
  const { schemas, responses, parameters, examples, requestBodies, headers, ...skipped } = components;
17
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'components' });
17
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
18
18
  const fields = {
19
19
  schemas: context.trace('schemas', () => (0, toSchemasV3_js_1.toOptionalSchemasV3)({ schemas, context })),
20
20
  responses: context.trace('responses', () => (0, toResponseV3_js_1.toOptionalResponsesV3)({ responses, context })),
@@ -1 +1 @@
1
- {"version":3,"file":"toContactV3.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/toContactV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAeF,CAAA"}
1
+ {"version":3,"file":"toContactV3.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/toContactV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAcF,CAAA"}
@@ -7,8 +7,7 @@ const toContactV3 = (contact, context) => {
7
7
  const { name, url, email, ...skipped } = contact;
8
8
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
9
9
  skipped,
10
- context,
11
- type: 'contact'
10
+ context
12
11
  });
13
12
  return new Contact_js_1.OasContact({
14
13
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,KAAK,gBAAgB,GAAG;IACtB,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,gCAG5B,gBAAgB,KAAG,cAmBrB,CAAA"}
1
+ {"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,KAAK,gBAAgB,GAAG;IACtB,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,gCAG5B,gBAAgB,KAAG,cAkBrB,CAAA"}
@@ -10,8 +10,7 @@ const toDocumentFieldsV3 = ({ documentObject, context }) => {
10
10
  const { openapi, info, paths, components, tags, ...skipped } = documentObject;
11
11
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
12
12
  skipped,
13
- context,
14
- type: 'document'
13
+ context
15
14
  });
16
15
  const fields = {
17
16
  openapi,
@@ -38,7 +38,7 @@ const toExampleV3 = ({ example, context }) => {
38
38
  return (0, toRefV31_js_1.toRefV31)({ ref: example, refType: 'example', context });
39
39
  }
40
40
  const { summary, description, value, ...skipped } = example;
41
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'example' });
41
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
42
42
  return new Example_js_1.OasExample({
43
43
  summary,
44
44
  description,
@@ -22,7 +22,7 @@ const toHeaderV3 = ({ header, context }) => {
22
22
  return (0, toRefV31_js_1.toRefV31)({ ref: header, refType: 'header', context });
23
23
  }
24
24
  const { description, required, deprecated, schema, example, examples, content, ...skipped } = header;
25
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'header' });
25
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
26
26
  const fields = {
27
27
  description,
28
28
  required,
@@ -1 +1 @@
1
- {"version":3,"file":"toInfoV3.d.ts","sourceRoot":"","sources":["../../../src/oas/info/toInfoV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKnC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,UAAU,CAAA;IAC1B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,OAkB1D,CAAA"}
1
+ {"version":3,"file":"toInfoV3.d.ts","sourceRoot":"","sources":["../../../src/oas/info/toInfoV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKnC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,UAAU,CAAA;IAC1B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,OAiB1D,CAAA"}
@@ -9,8 +9,7 @@ const toInfoV3 = ({ info, context }) => {
9
9
  const { title, description, termsOfService, contact, license, version, ...skipped } = info;
10
10
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
11
11
  skipped,
12
- context,
13
- type: 'info'
12
+ context
14
13
  });
15
14
  return new Info_js_1.OasInfo({
16
15
  title,
@@ -6,7 +6,7 @@ const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toS
6
6
  const integer_types_js_1 = require("./integer-types.js");
7
7
  const toInteger = ({ value, context }) => {
8
8
  const { type: _type, title, description, nullable, format, enum: enums, example, ...skipped } = integer_types_js_1.oasIntegerData.parse(value);
9
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'integer' });
9
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
10
10
  return new Integer_js_1.OasInteger({
11
11
  title,
12
12
  description,
@@ -7,7 +7,7 @@ const toSchemasV3_js_1 = require("../schema/toSchemasV3.js");
7
7
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
8
8
  const toIntersection = ({ value, members, context }) => {
9
9
  const { discriminator, title, description, nullable, ...skipped } = value;
10
- const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'intersection' });
10
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
11
11
  return new Intersection_js_1.OasIntersection({
12
12
  title,
13
13
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toLicenseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/license/toLicenseV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAcF,CAAA"}
1
+ {"version":3,"file":"toLicenseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/license/toLicenseV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,YACb,SAAS,CAAC,aAAa,WACvB,YAAY,KACpB,UAaF,CAAA"}
@@ -7,8 +7,7 @@ const toLicenseV3 = (license, context) => {
7
7
  const { name, url, ...skipped } = license;
8
8
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
9
9
  skipped,
10
- context,
11
- type: 'license'
10
+ context
12
11
  });
13
12
  return new License_js_1.OasLicense({
14
13
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"toMediaTypeItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/toMediaTypeItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,SAAS,CAAC,eAAe,CAAA;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAI3B,qBAAqB,KAAG,YAwB1B,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IAClD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,yBAG5B,sBAAsB,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAatD,CAAA;AAED,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,0BAA0B,yBAGpC,8BAA8B,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAMlE,CAAA"}
1
+ {"version":3,"file":"toMediaTypeItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/mediaType/toMediaTypeItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,SAAS,CAAC,eAAe,CAAA;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAI3B,qBAAqB,KAAG,YAuB1B,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IAClD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,yBAG5B,sBAAsB,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAatD,CAAA;AAED,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,0BAA0B,yBAGpC,8BAA8B,KAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAMlE,CAAA"}
@@ -9,8 +9,7 @@ const toMediaTypeItemV3 = ({ mediaTypeItem, mediaType, context }) => {
9
9
  const { schema, example, examples, ...skipped } = mediaTypeItem;
10
10
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
11
11
  skipped,
12
- context,
13
- type: 'media-type'
12
+ context
14
13
  });
15
14
  const fields = {
16
15
  mediaType,
@@ -1 +1 @@
1
- {"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAgB3D,CAAA"}
1
+ {"version":3,"file":"toNumber.d.ts","sourceRoot":"","sources":["../../../src/oas/number/toNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAe3D,CAAA"}
@@ -7,8 +7,7 @@ const toNumber = ({ value, context }) => {
7
7
  const { type: _type, title, description, nullable, example, ...skipped } = value;
8
8
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
9
9
  skipped,
10
- context,
11
- type: 'number'
10
+ context
12
11
  });
13
12
  return new Number_js_1.OasNumber({
14
13
  title,
@@ -1 +1 @@
1
- {"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAA;AAK7D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAsC3D,CAAA"}
1
+ {"version":3,"file":"toObject.d.ts","sourceRoot":"","sources":["../../../src/oas/object/toObject.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAA;AAK7D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA+C3D,CAAA"}
@@ -9,9 +9,16 @@ const toObject = ({ value, context }) => {
9
9
  const { type: _type, title, description, properties, required, additionalProperties, nullable, example, ...skipped } = value;
10
10
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
11
11
  skipped,
12
- context,
13
- type: 'object'
12
+ context
14
13
  });
14
+ if (extensionFields && Object.keys(extensionFields).length > 0) {
15
+ const last = context.stackTrail.stackTrail.slice(-1);
16
+ context.registerExtension({
17
+ extensionFields,
18
+ type: 'model',
19
+ stackTrail: ['models', last.toString()]
20
+ });
21
+ }
15
22
  const fields = {
16
23
  title,
17
24
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAOD,eAAO,MAAM,aAAa,0CAIvB,iBAAiB,KAAG,YA6BtB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,uBAAwB,kBAAkB,KAAG,YAAY,EAsDnF,CAAA"}
1
+ {"version":3,"file":"toOperationsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,WAAW,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAOD,eAAO,MAAM,aAAa,0CAIvB,iBAAiB,KAAG,YAuCtB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,uBAAwB,kBAAkB,KAAG,YAAY,EAsDnF,CAAA"}
@@ -11,6 +11,14 @@ const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toS
11
11
  const toOperationV3 = ({ operation, operationInfo, context }) => {
12
12
  const { method, path, pathItem } = operationInfo;
13
13
  const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, ...skipped } = operation;
14
+ const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context });
15
+ if (extensionFields && Object.keys(extensionFields).length > 0) {
16
+ context.registerExtension({
17
+ extensionFields,
18
+ type: 'operation',
19
+ stackTrail: ['operations', path, method]
20
+ });
21
+ }
14
22
  return new Operation_js_1.OasOperation({
15
23
  pathItem,
16
24
  path,
@@ -23,7 +31,7 @@ const toOperationV3 = ({ operation, operationInfo, context }) => {
23
31
  requestBody: context.trace('requestBody', () => (0, toRequestBodiesV3_js_1.toRequestBodyV3)({ requestBody, context })),
24
32
  responses: context.trace('responses', () => (0, toResponseV3_js_1.toResponsesV3)({ responses, context })),
25
33
  deprecated,
26
- extensionFields: (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'operation' })
34
+ extensionFields
27
35
  });
28
36
  };
29
37
  exports.toOperationV3 = toOperationV3;
@@ -39,8 +39,7 @@ const toParameterV3 = ({ parameter, context }) => {
39
39
  const { name, in: location, description, required, deprecated, allowEmptyValue, allowReserved, schema, example, examples, content, style, explode, ...skipped } = parameter;
40
40
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
41
41
  skipped,
42
- context,
43
- type: 'parameter'
42
+ context
44
43
  });
45
44
  const parsedLocation = parameter_types_js_1.oasParameterLocation.parse(location);
46
45
  if (parsedLocation === 'path' && !required) {
@@ -10,7 +10,7 @@ const toPathItemV3 = ({ pathItem, context }) => {
10
10
  summary,
11
11
  description,
12
12
  parameters: context.trace('parameters', () => (0, toParameterV3_js_1.toParameterListV3)({ parameters, context })),
13
- extensionFields: (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context, type: 'pathItem' })
13
+ extensionFields: (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({ skipped, context })
14
14
  });
15
15
  };
16
16
  exports.toPathItemV3 = toPathItemV3;
@@ -1 +1 @@
1
- {"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,6BAGzB,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA2BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,+BAG3B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAYnF,CAAA"}
1
+ {"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,6BAGzB,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA0BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,iBAAiB,+BAG3B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAYnF,CAAA"}
@@ -16,8 +16,7 @@ const toRequestBodyV3 = ({ requestBody, context }) => {
16
16
  const { description, content, required, ...skipped } = requestBody;
17
17
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
18
18
  skipped,
19
- context,
20
- type: 'requestBody'
19
+ context
21
20
  });
22
21
  const fields = {
23
22
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,2BAGvB,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAMrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,2BAG/B,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAqBpD,CAAA"}
1
+ {"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,aAAa,2BAGvB,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAMrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,qBAAqB,2BAG/B,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAoBpD,CAAA"}
@@ -27,8 +27,7 @@ const toResponseV3 = ({ response, context }) => {
27
27
  const { description, headers, content, ...skipped } = response;
28
28
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
29
29
  skipped,
30
- context,
31
- type: 'response'
30
+ context
32
31
  });
33
32
  const fields = {
34
33
  description,
@@ -31,9 +31,9 @@ const toSchemaV3 = ({ schema, context }) => {
31
31
  return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', context });
32
32
  }
33
33
  // Workaround for dodgy Reapit schema
34
- if (schema.type !== 'array' && 'optional' in schema && schema.optional === true) {
35
- schema.nullable = true;
36
- }
34
+ // if (schema.type !== 'array' && 'optional' in schema && schema.optional === true) {
35
+ // schema.nullable = true
36
+ // }
37
37
  return (0, ts_pattern_1.match)(schema)
38
38
  .with({ oneOf: ts_pattern_1.P.array() }, ({ oneOf: members, ...value }) => {
39
39
  // if (members.length === 1) {
@@ -1,9 +1,8 @@
1
1
  import type { ParseContext } from '../../context/ParseContext.js';
2
2
  type ToSpecificationExtensionsV3Args = {
3
- type: string;
4
3
  skipped: Record<string, unknown>;
5
4
  context: ParseContext;
6
5
  };
7
- export declare const toSpecificationExtensionsV3: ({ type, skipped: s, context }: ToSpecificationExtensionsV3Args) => Record<string, unknown> | undefined;
6
+ export declare const toSpecificationExtensionsV3: ({ skipped: s, context }: ToSpecificationExtensionsV3Args) => Record<string, unknown> | undefined;
8
7
  export {};
9
8
  //# sourceMappingURL=toSpecificationExtensionsV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toSpecificationExtensionsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/specificationExtensions/toSpecificationExtensionsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,KAAK,+BAA+B,GAAG;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,2BAA2B,kCAIrC,+BAA+B,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAgC9D,CAAA"}
1
+ {"version":3,"file":"toSpecificationExtensionsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/specificationExtensions/toSpecificationExtensionsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,KAAK,+BAA+B,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,2BAA2B,4BAGrC,+BAA+B,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SA4B9D,CAAA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toSpecificationExtensionsV3 = void 0;
4
- const toSpecificationExtensionsV3 = ({ type, skipped: s, context }) => {
4
+ const toSpecificationExtensionsV3 = ({ skipped: s, context }) => {
5
5
  const { skipped, extensionFields } = Object.entries(s).reduce((acc, [key, value]) => {
6
6
  if (!key.startsWith('x-')) {
7
7
  return acc;
@@ -17,9 +17,6 @@ const toSpecificationExtensionsV3 = ({ type, skipped: s, context }) => {
17
17
  };
18
18
  }, { skipped: s, extensionFields: undefined });
19
19
  context.logSkippedFields(skipped);
20
- if (extensionFields && Object.keys(extensionFields).length > 0) {
21
- context.registerExtension({ extensionFields, type });
22
- }
23
20
  return extensionFields;
24
21
  };
25
22
  exports.toSpecificationExtensionsV3 = toSpecificationExtensionsV3;
@@ -1 +1 @@
1
- {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/oas/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SA+B3D,CAAA"}
1
+ {"version":3,"file":"toString.d.ts","sourceRoot":"","sources":["../../../src/oas/string/toString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IACrC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,uBAAwB,YAAY,KAAG,SAkC3D,CAAA"}
@@ -8,9 +8,11 @@ const toString = ({ value, context }) => {
8
8
  const { type: _type, title, description, enum: enums, nullable, example, format, maxLength, minLength, ...skipped } = string_types_js_1.oasStringData.parse(value);
9
9
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
10
10
  skipped,
11
- context,
12
- type: 'string'
11
+ context
13
12
  });
13
+ // if (extensionFields && Object.keys(extensionFields).length > 0) {
14
+ // context.registerExtension({ extensionFields, type: 'string' })
15
+ // }
14
16
  return new String_js_1.OasString({
15
17
  title,
16
18
  description,
@@ -1 +1 @@
1
- {"version":3,"file":"toTagsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/tag/toTagsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAIjC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,GAAG,SAAS,CAAA;IACvC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,MAAM,EAAE,GAAG,SAMrE,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,SAAS,CAAC,SAAS,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,qBAAsB,WAAW,KAAG,MAgBvD,CAAA"}
1
+ {"version":3,"file":"toTagsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/tag/toTagsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAIjC,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,GAAG,SAAS,CAAA;IACvC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,YAAY,KAAG,MAAM,EAAE,GAAG,SAMrE,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,SAAS,CAAC,SAAS,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,qBAAsB,WAAW,KAAG,MAevD,CAAA"}
@@ -14,8 +14,7 @@ const toTagV3 = ({ tag, context }) => {
14
14
  const { name, description, ...skipped } = tag;
15
15
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
16
16
  skipped,
17
- context,
18
- type: 'tag'
17
+ context
19
18
  });
20
19
  const fields = {
21
20
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../src/oas/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,gCAAiC,WAAW,KAAG,QAsBlE,CAAA"}
1
+ {"version":3,"file":"toUnion.d.ts","sourceRoot":"","sources":["../../../src/oas/union/toUnion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAKrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,YAAY,CAAA;IAC7B,OAAO,EAAE,CAAC,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,CAAA;IAC/D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,OAAO,gCAAiC,WAAW,KAAG,QAqBlE,CAAA"}
@@ -9,8 +9,7 @@ const toUnion = ({ value, members, context }) => {
9
9
  const { discriminator, title, description, nullable, example, ...skipped } = value;
10
10
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
11
11
  skipped,
12
- context,
13
- type: 'union'
12
+ context
14
13
  });
15
14
  return new Union_js_1.OasUnion({
16
15
  title,
@@ -1 +1 @@
1
- {"version":3,"file":"toUnknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/toUnknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IAErC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAe7D,CAAA"}
1
+ {"version":3,"file":"toUnknown.d.ts","sourceRoot":"","sources":["../../../src/oas/unknown/toUnknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAAA;IAErC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,uBAAwB,aAAa,KAAG,UAc7D,CAAA"}
@@ -7,8 +7,7 @@ const toUnknown = ({ value, context }) => {
7
7
  const { type: _type, title, description, example, ...skipped } = value;
8
8
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
9
9
  skipped,
10
- context,
11
- type: 'unknown'
10
+ context
12
11
  });
13
12
  return new Unknown_js_1.OasUnknown({
14
13
  title,