@skmtc/core 0.0.939 → 0.0.941
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.
- package/esm/context/CoreContext.d.ts +6 -32
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +15 -60
- package/esm/context/GenerateContext.d.ts +4 -15
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +16 -35
- package/esm/context/ParseContext.d.ts +5 -9
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +11 -18
- package/esm/context/RenderContext.d.ts +6 -209
- package/esm/context/RenderContext.d.ts.map +1 -1
- package/esm/context/RenderContext.js +8 -215
- package/esm/context/ResultsHandler.d.ts +0 -67
- package/esm/context/ResultsHandler.d.ts.map +1 -1
- package/esm/context/ResultsHandler.js +2 -68
- package/esm/context/StackTrail.d.ts +2 -0
- package/esm/context/StackTrail.d.ts.map +1 -1
- package/esm/context/StackTrail.js +26 -0
- package/esm/context/generateTypes.d.ts +2 -2
- package/esm/context/generateTypes.d.ts.map +1 -1
- package/esm/context/parseTypes.d.ts +7 -2
- package/esm/context/parseTypes.d.ts.map +1 -1
- package/esm/oas/_helpers/parseEnum.d.ts +3 -1
- package/esm/oas/_helpers/parseEnum.d.ts.map +1 -1
- package/esm/oas/_helpers/parseEnum.js +2 -1
- package/esm/oas/_helpers/parseNullable.d.ts +4 -1
- package/esm/oas/_helpers/parseNullable.d.ts.map +1 -1
- package/esm/oas/_helpers/parseNullable.js +2 -1
- package/esm/oas/array/toArray.d.ts +5 -2
- package/esm/oas/array/toArray.d.ts.map +1 -1
- package/esm/oas/array/toArray.js +16 -9
- package/esm/oas/boolean/toBoolean.d.ts +5 -2
- package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
- package/esm/oas/boolean/toBoolean.js +16 -8
- package/esm/oas/components/toComponentsV3.d.ts +3 -1
- package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
- package/esm/oas/components/toComponentsV3.js +9 -8
- package/esm/oas/contact/toContactV3.d.ts +2 -1
- package/esm/oas/contact/toContactV3.d.ts.map +1 -1
- package/esm/oas/contact/toContactV3.js +2 -1
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts +3 -1
- package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/esm/oas/discriminator/toDiscriminatorV3.js +7 -2
- package/esm/oas/document/toDocumentFieldsV3.d.ts +3 -1
- package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
- package/esm/oas/document/toDocumentFieldsV3.js +10 -9
- package/esm/oas/example/toExamplesV3.d.ts +10 -2
- package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
- package/esm/oas/example/toExamplesV3.js +8 -7
- package/esm/oas/externalDocs/toExternalDocs.d.ts +3 -1
- package/esm/oas/externalDocs/toExternalDocs.d.ts.map +1 -1
- package/esm/oas/externalDocs/toExternalDocs.js +1 -1
- package/esm/oas/header/toHeadersV3.d.ts +3 -1
- package/esm/oas/header/toHeadersV3.d.ts.map +1 -1
- package/esm/oas/header/toHeadersV3.js +8 -7
- package/esm/oas/info/toInfoV3.d.ts +3 -1
- package/esm/oas/info/toInfoV3.d.ts.map +1 -1
- package/esm/oas/info/toInfoV3.js +4 -3
- package/esm/oas/integer/toInteger.d.ts +5 -2
- package/esm/oas/integer/toInteger.d.ts.map +1 -1
- package/esm/oas/integer/toInteger.js +17 -9
- package/esm/oas/license/toLicenseV3.d.ts +2 -1
- package/esm/oas/license/toLicenseV3.d.ts.map +1 -1
- package/esm/oas/license/toLicenseV3.js +2 -1
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts +10 -3
- package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/esm/oas/mediaType/toMediaTypeItemV3.js +9 -8
- package/esm/oas/number/toNumber.d.ts +3 -1
- package/esm/oas/number/toNumber.d.ts.map +1 -1
- package/esm/oas/number/toNumber.js +15 -7
- package/esm/oas/object/toAdditionalPropertiesV3.d.ts +3 -1
- package/esm/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
- package/esm/oas/object/toAdditionalPropertiesV3.js +2 -2
- package/esm/oas/object/toObject.d.ts +3 -1
- package/esm/oas/object/toObject.d.ts.map +1 -1
- package/esm/oas/object/toObject.js +15 -9
- package/esm/oas/operation/toOperationsV3.d.ts +5 -2
- package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/oas/operation/toOperationsV3.js +14 -12
- package/esm/oas/parameter/toParameterV3.d.ts +7 -3
- package/esm/oas/parameter/toParameterV3.d.ts.map +1 -1
- package/esm/oas/parameter/toParameterV3.js +18 -16
- package/esm/oas/pathItem/toPathItemV3.d.ts +3 -1
- package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/esm/oas/pathItem/toPathItemV3.js +3 -3
- package/esm/oas/ref/toRefV31.d.ts +3 -1
- package/esm/oas/ref/toRefV31.d.ts.map +1 -1
- package/esm/oas/ref/toRefV31.js +3 -3
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts +5 -2
- package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/esm/oas/requestBody/toRequestBodiesV3.js +7 -7
- package/esm/oas/response/toResponseV3.d.ts +7 -3
- package/esm/oas/response/toResponseV3.d.ts.map +1 -1
- package/esm/oas/response/toResponseV3.js +10 -9
- package/esm/oas/schema/toSchemasV3.d.ts +9 -4
- package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/esm/oas/schema/toSchemasV3.js +33 -25
- package/esm/oas/securityRequirement/toSecurityRequirement.d.ts +3 -1
- package/esm/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -1
- package/esm/oas/securityRequirement/toSecurityRequirement.js +1 -1
- package/esm/oas/securitySchemes/toSecuritySchemes.d.ts +3 -1
- package/esm/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
- package/esm/oas/securitySchemes/toSecuritySchemes.js +23 -8
- package/esm/oas/server/toServerV3.d.ts +7 -3
- package/esm/oas/server/toServerV3.d.ts.map +1 -1
- package/esm/oas/server/toServerV3.js +7 -7
- package/esm/oas/serverVariable/toServerVariableV3.d.ts +7 -3
- package/esm/oas/serverVariable/toServerVariableV3.d.ts.map +1 -1
- package/esm/oas/serverVariable/toServerVariableV3.js +6 -5
- package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
- package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
- package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
- package/esm/oas/string/toString.d.ts +6 -2
- package/esm/oas/string/toString.d.ts.map +1 -1
- package/esm/oas/string/toString.js +18 -9
- package/esm/oas/tag/toTagsV3.d.ts +5 -2
- package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
- package/esm/oas/tag/toTagsV3.js +4 -3
- package/esm/oas/union/toUnion.d.ts +3 -1
- package/esm/oas/union/toUnion.d.ts.map +1 -1
- package/esm/oas/union/toUnion.js +4 -4
- package/esm/oas/unknown/toUnknown.d.ts +3 -1
- package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
- package/esm/oas/unknown/toUnknown.js +2 -1
- package/esm/run/toArtifacts.d.ts +4 -1
- package/esm/run/toArtifacts.d.ts.map +1 -1
- package/esm/run/toArtifacts.js +2 -1
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +6 -32
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +15 -60
- package/script/context/GenerateContext.d.ts +4 -15
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +16 -35
- package/script/context/ParseContext.d.ts +5 -9
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +11 -18
- package/script/context/RenderContext.d.ts +6 -209
- package/script/context/RenderContext.d.ts.map +1 -1
- package/script/context/RenderContext.js +8 -215
- package/script/context/ResultsHandler.d.ts +0 -67
- package/script/context/ResultsHandler.d.ts.map +1 -1
- package/script/context/ResultsHandler.js +2 -68
- package/script/context/StackTrail.d.ts +2 -0
- package/script/context/StackTrail.d.ts.map +1 -1
- package/script/context/StackTrail.js +26 -0
- package/script/context/generateTypes.d.ts +2 -2
- package/script/context/generateTypes.d.ts.map +1 -1
- package/script/context/parseTypes.d.ts +7 -2
- package/script/context/parseTypes.d.ts.map +1 -1
- package/script/oas/_helpers/parseEnum.d.ts +3 -1
- package/script/oas/_helpers/parseEnum.d.ts.map +1 -1
- package/script/oas/_helpers/parseEnum.js +2 -1
- package/script/oas/_helpers/parseNullable.d.ts +4 -1
- package/script/oas/_helpers/parseNullable.d.ts.map +1 -1
- package/script/oas/_helpers/parseNullable.js +2 -1
- package/script/oas/array/toArray.d.ts +5 -2
- package/script/oas/array/toArray.d.ts.map +1 -1
- package/script/oas/array/toArray.js +16 -9
- package/script/oas/boolean/toBoolean.d.ts +5 -2
- package/script/oas/boolean/toBoolean.d.ts.map +1 -1
- package/script/oas/boolean/toBoolean.js +16 -8
- package/script/oas/components/toComponentsV3.d.ts +3 -1
- package/script/oas/components/toComponentsV3.d.ts.map +1 -1
- package/script/oas/components/toComponentsV3.js +9 -8
- package/script/oas/contact/toContactV3.d.ts +2 -1
- package/script/oas/contact/toContactV3.d.ts.map +1 -1
- package/script/oas/contact/toContactV3.js +2 -1
- package/script/oas/discriminator/toDiscriminatorV3.d.ts +3 -1
- package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
- package/script/oas/discriminator/toDiscriminatorV3.js +7 -2
- package/script/oas/document/toDocumentFieldsV3.d.ts +3 -1
- package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
- package/script/oas/document/toDocumentFieldsV3.js +10 -9
- package/script/oas/example/toExamplesV3.d.ts +10 -2
- package/script/oas/example/toExamplesV3.d.ts.map +1 -1
- package/script/oas/example/toExamplesV3.js +8 -7
- package/script/oas/externalDocs/toExternalDocs.d.ts +3 -1
- package/script/oas/externalDocs/toExternalDocs.d.ts.map +1 -1
- package/script/oas/externalDocs/toExternalDocs.js +1 -1
- package/script/oas/header/toHeadersV3.d.ts +3 -1
- package/script/oas/header/toHeadersV3.d.ts.map +1 -1
- package/script/oas/header/toHeadersV3.js +8 -7
- package/script/oas/info/toInfoV3.d.ts +3 -1
- package/script/oas/info/toInfoV3.d.ts.map +1 -1
- package/script/oas/info/toInfoV3.js +4 -3
- package/script/oas/integer/toInteger.d.ts +5 -2
- package/script/oas/integer/toInteger.d.ts.map +1 -1
- package/script/oas/integer/toInteger.js +17 -9
- package/script/oas/license/toLicenseV3.d.ts +2 -1
- package/script/oas/license/toLicenseV3.d.ts.map +1 -1
- package/script/oas/license/toLicenseV3.js +2 -1
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts +10 -3
- package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
- package/script/oas/mediaType/toMediaTypeItemV3.js +9 -8
- package/script/oas/number/toNumber.d.ts +3 -1
- package/script/oas/number/toNumber.d.ts.map +1 -1
- package/script/oas/number/toNumber.js +15 -7
- package/script/oas/object/toAdditionalPropertiesV3.d.ts +3 -1
- package/script/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
- package/script/oas/object/toAdditionalPropertiesV3.js +2 -2
- package/script/oas/object/toObject.d.ts +3 -1
- package/script/oas/object/toObject.d.ts.map +1 -1
- package/script/oas/object/toObject.js +15 -9
- package/script/oas/operation/toOperationsV3.d.ts +5 -2
- package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/script/oas/operation/toOperationsV3.js +14 -12
- package/script/oas/parameter/toParameterV3.d.ts +7 -3
- package/script/oas/parameter/toParameterV3.d.ts.map +1 -1
- package/script/oas/parameter/toParameterV3.js +18 -16
- package/script/oas/pathItem/toPathItemV3.d.ts +3 -1
- package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
- package/script/oas/pathItem/toPathItemV3.js +3 -3
- package/script/oas/ref/toRefV31.d.ts +3 -1
- package/script/oas/ref/toRefV31.d.ts.map +1 -1
- package/script/oas/ref/toRefV31.js +3 -3
- package/script/oas/requestBody/toRequestBodiesV3.d.ts +5 -2
- package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
- package/script/oas/requestBody/toRequestBodiesV3.js +7 -7
- package/script/oas/response/toResponseV3.d.ts +7 -3
- package/script/oas/response/toResponseV3.d.ts.map +1 -1
- package/script/oas/response/toResponseV3.js +10 -9
- package/script/oas/schema/toSchemasV3.d.ts +9 -4
- package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
- package/script/oas/schema/toSchemasV3.js +33 -25
- package/script/oas/securityRequirement/toSecurityRequirement.d.ts +3 -1
- package/script/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -1
- package/script/oas/securityRequirement/toSecurityRequirement.js +1 -1
- package/script/oas/securitySchemes/toSecuritySchemes.d.ts +3 -1
- package/script/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
- package/script/oas/securitySchemes/toSecuritySchemes.js +23 -8
- package/script/oas/server/toServerV3.d.ts +7 -3
- package/script/oas/server/toServerV3.d.ts.map +1 -1
- package/script/oas/server/toServerV3.js +7 -7
- package/script/oas/serverVariable/toServerVariableV3.d.ts +7 -3
- package/script/oas/serverVariable/toServerVariableV3.d.ts.map +1 -1
- package/script/oas/serverVariable/toServerVariableV3.js +6 -5
- package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
- package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
- package/script/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
- package/script/oas/string/toString.d.ts +6 -2
- package/script/oas/string/toString.d.ts.map +1 -1
- package/script/oas/string/toString.js +18 -9
- package/script/oas/tag/toTagsV3.d.ts +5 -2
- package/script/oas/tag/toTagsV3.d.ts.map +1 -1
- package/script/oas/tag/toTagsV3.js +4 -3
- package/script/oas/union/toUnion.d.ts +3 -1
- package/script/oas/union/toUnion.d.ts.map +1 -1
- package/script/oas/union/toUnion.js +4 -4
- package/script/oas/unknown/toUnknown.d.ts +3 -1
- package/script/oas/unknown/toUnknown.d.ts.map +1 -1
- package/script/oas/unknown/toUnknown.js +2 -1
- package/script/run/toArtifacts.d.ts +4 -1
- package/script/run/toArtifacts.d.ts.map +1 -1
- package/script/run/toArtifacts.js +2 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
2
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
3
3
|
import { OasPathItem } from './PathItem.js';
|
|
4
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
4
5
|
type ToPathItemV3Args = {
|
|
5
6
|
pathItem: OpenAPIV3.PathItemObject;
|
|
7
|
+
stackTrail: StackTrail;
|
|
6
8
|
context: ParseContextType;
|
|
7
9
|
};
|
|
8
|
-
export declare const toPathItemV3: ({ pathItem, context }: ToPathItemV3Args) => OasPathItem;
|
|
10
|
+
export declare const toPathItemV3: ({ pathItem, stackTrail, context }: ToPathItemV3Args) => OasPathItem;
|
|
9
11
|
export {};
|
|
10
12
|
//# sourceMappingURL=toPathItemV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toPathItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/pathItem/toPathItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"toPathItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/pathItem/toPathItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,cAAc,CAAA;IAClC,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,mCAAmC,gBAAgB,KAAG,WAiBlF,CAAA"}
|
|
@@ -4,17 +4,17 @@ exports.toPathItemV3 = void 0;
|
|
|
4
4
|
const toParameterV3_js_1 = require("../parameter/toParameterV3.js");
|
|
5
5
|
const PathItem_js_1 = require("./PathItem.js");
|
|
6
6
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
7
|
-
const
|
|
8
|
-
const toPathItemV3 = ({ pathItem, context }) => {
|
|
7
|
+
const toPathItemV3 = ({ pathItem, stackTrail, context }) => {
|
|
9
8
|
const { summary, description, parameters, ...skipped } = pathItem;
|
|
10
9
|
return new PathItem_js_1.OasPathItem({
|
|
11
10
|
summary,
|
|
12
11
|
description,
|
|
13
|
-
parameters:
|
|
12
|
+
parameters: stackTrail.trace('parameters', st => (0, toParameterV3_js_1.toParameterListV3)({ parameters, stackTrail: st, context })),
|
|
14
13
|
extensionFields: (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
|
|
15
14
|
skipped,
|
|
16
15
|
parent: pathItem,
|
|
17
16
|
context,
|
|
17
|
+
stackTrail,
|
|
18
18
|
parentType: 'pathItem'
|
|
19
19
|
})
|
|
20
20
|
});
|
|
@@ -2,11 +2,13 @@ import type { OpenAPIV3_1 } from 'openapi-types';
|
|
|
2
2
|
import type { OasRefData } from './ref-types.js';
|
|
3
3
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
4
4
|
import { OasRef } from './Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
5
6
|
type ToRefV31Args<T extends OasRefData['refType']> = {
|
|
6
7
|
ref: OpenAPIV3_1.ReferenceObject;
|
|
7
8
|
refType: T;
|
|
9
|
+
stackTrail: StackTrail;
|
|
8
10
|
context: ParseContextType;
|
|
9
11
|
};
|
|
10
|
-
export declare const toRefV31: <T extends OasRefData["refType"]>({ ref, refType, context }: ToRefV31Args<T>) => OasRef<T>;
|
|
12
|
+
export declare const toRefV31: <T extends OasRefData["refType"]>({ ref, refType, stackTrail, context }: ToRefV31Args<T>) => OasRef<T>;
|
|
11
13
|
export {};
|
|
12
14
|
//# sourceMappingURL=toRefV31.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toRefV31.d.ts","sourceRoot":"","sources":["../../../src/oas/ref/toRefV31.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"toRefV31.d.ts","sourceRoot":"","sources":["../../../src/oas/ref/toRefV31.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,IAAI;IACnD,GAAG,EAAE,WAAW,CAAC,eAAe,CAAA;IAChC,OAAO,EAAE,CAAC,CAAA;IACV,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,uCAKvD,YAAY,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,CAAC,CAgB5B,CAAA"}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toRefV31 = void 0;
|
|
4
4
|
const Ref_js_1 = require("./Ref.js");
|
|
5
5
|
const isEmpty_js_1 = require("../../helpers/isEmpty.js");
|
|
6
|
-
const toRefV31 = ({ ref, refType, context }) => {
|
|
6
|
+
const toRefV31 = ({ ref, refType, stackTrail, context }) => {
|
|
7
7
|
const { $ref, ...skipped } = ref;
|
|
8
8
|
if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
|
|
9
|
-
context.logSkippedFields({ skipped, parent: ref, parentType: 'ref' });
|
|
9
|
+
context.logSkippedFields({ skipped, parent: ref, parentType: 'ref', stackTrail });
|
|
10
10
|
}
|
|
11
|
-
context.registerRef(
|
|
11
|
+
context.registerRef(stackTrail.clone(), $ref);
|
|
12
12
|
return new Ref_js_1.OasRef({
|
|
13
13
|
refType,
|
|
14
14
|
$ref
|
|
@@ -2,16 +2,19 @@ import type { OpenAPIV3 } from 'openapi-types';
|
|
|
2
2
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
3
3
|
import { OasRequestBody } from './RequestBody.js';
|
|
4
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
5
6
|
type ToRequestBodyV3Args = {
|
|
6
7
|
requestBody: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject | undefined;
|
|
7
8
|
forceRef?: boolean;
|
|
9
|
+
stackTrail: StackTrail;
|
|
8
10
|
context: ParseContextType;
|
|
9
11
|
};
|
|
10
|
-
export declare const toRequestBodyV3: ({ requestBody, context }: ToRequestBodyV3Args) => OasRequestBody | OasRef<"requestBody"> | undefined;
|
|
12
|
+
export declare const toRequestBodyV3: ({ requestBody, stackTrail, context }: ToRequestBodyV3Args) => OasRequestBody | OasRef<"requestBody"> | undefined;
|
|
11
13
|
type ToRequestBodiesV3Args = {
|
|
12
14
|
requestBodies: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject> | undefined;
|
|
15
|
+
stackTrail: StackTrail;
|
|
13
16
|
context: ParseContextType;
|
|
14
17
|
};
|
|
15
|
-
export declare const toRequestBodiesV3: ({ requestBodies, context }: ToRequestBodiesV3Args) => Record<string, OasRequestBody | OasRef<"requestBody">> | undefined;
|
|
18
|
+
export declare const toRequestBodiesV3: ({ requestBodies, stackTrail, context }: ToRequestBodiesV3Args) => Record<string, OasRequestBody | OasRef<"requestBody">> | undefined;
|
|
16
19
|
export {};
|
|
17
20
|
//# sourceMappingURL=toRequestBodiesV3.d.ts.map
|
|
@@ -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,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAInE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,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,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAInE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,sCAI7B,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA6BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,wCAI/B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAiBnF,CAAA"}
|
|
@@ -6,25 +6,25 @@ const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
|
6
6
|
const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
|
|
7
7
|
const RequestBody_js_1 = require("./RequestBody.js");
|
|
8
8
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
9
|
-
const
|
|
10
|
-
const toRequestBodyV3 = ({ requestBody, context }) => {
|
|
9
|
+
const toRequestBodyV3 = ({ requestBody, stackTrail, context }) => {
|
|
11
10
|
if (!requestBody) {
|
|
12
11
|
return undefined;
|
|
13
12
|
}
|
|
14
13
|
if ((0, refFns_js_1.isRef)(requestBody)) {
|
|
15
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: requestBody, refType: 'requestBody', context });
|
|
14
|
+
return (0, toRefV31_js_1.toRefV31)({ ref: requestBody, refType: 'requestBody', stackTrail, context });
|
|
16
15
|
}
|
|
17
16
|
const { description, content, required, ...skipped } = requestBody;
|
|
18
17
|
const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
|
|
19
18
|
skipped,
|
|
20
19
|
parent: requestBody,
|
|
21
20
|
context,
|
|
21
|
+
stackTrail,
|
|
22
22
|
parentType: 'requestBody'
|
|
23
23
|
});
|
|
24
24
|
const fields = {
|
|
25
25
|
description,
|
|
26
|
-
content:
|
|
27
|
-
return (0, toMediaTypeItemV3_js_1.toMediaTypeItemsV3)({ content, context });
|
|
26
|
+
content: stackTrail.trace('content', st => {
|
|
27
|
+
return (0, toMediaTypeItemV3_js_1.toMediaTypeItemsV3)({ content, stackTrail: st, context });
|
|
28
28
|
}),
|
|
29
29
|
required,
|
|
30
30
|
extensionFields
|
|
@@ -32,7 +32,7 @@ const toRequestBodyV3 = ({ requestBody, context }) => {
|
|
|
32
32
|
return new RequestBody_js_1.OasRequestBody(fields);
|
|
33
33
|
};
|
|
34
34
|
exports.toRequestBodyV3 = toRequestBodyV3;
|
|
35
|
-
const toRequestBodiesV3 = ({ requestBodies, context }) => {
|
|
35
|
+
const toRequestBodiesV3 = ({ requestBodies, stackTrail, context }) => {
|
|
36
36
|
if (!requestBodies) {
|
|
37
37
|
return undefined;
|
|
38
38
|
}
|
|
@@ -40,7 +40,7 @@ const toRequestBodiesV3 = ({ requestBodies, context }) => {
|
|
|
40
40
|
.map(([key, value]) => {
|
|
41
41
|
return [
|
|
42
42
|
key,
|
|
43
|
-
|
|
43
|
+
stackTrail.trace(key, st => (0, exports.toRequestBodyV3)({ requestBody: value, stackTrail: st, context }))
|
|
44
44
|
];
|
|
45
45
|
})
|
|
46
46
|
.filter(([, value]) => Boolean(value));
|
|
@@ -2,20 +2,24 @@ import type { ParseContextType } from '../../context/parseTypes.js';
|
|
|
2
2
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
3
|
import { OasResponse } from './Response.js';
|
|
4
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
5
6
|
type ToResponsesV3Args = {
|
|
6
7
|
responses: OpenAPIV3.ResponsesObject;
|
|
8
|
+
stackTrail: StackTrail;
|
|
7
9
|
context: ParseContextType;
|
|
8
10
|
};
|
|
9
|
-
export declare const toResponsesV3: ({ responses, context }: ToResponsesV3Args) => Record<string, OasResponse | OasRef<"response">>;
|
|
11
|
+
export declare const toResponsesV3: ({ responses, stackTrail, context }: ToResponsesV3Args) => Record<string, OasResponse | OasRef<"response">>;
|
|
10
12
|
type ToOptionalResponsesV3Args = {
|
|
11
13
|
responses: OpenAPIV3.ResponsesObject | undefined;
|
|
14
|
+
stackTrail: StackTrail;
|
|
12
15
|
context: ParseContextType;
|
|
13
16
|
};
|
|
14
|
-
export declare const toOptionalResponsesV3: ({ responses, context }: ToOptionalResponsesV3Args) => Record<string, OasResponse | OasRef<"response">> | undefined;
|
|
17
|
+
export declare const toOptionalResponsesV3: ({ responses, stackTrail, context }: ToOptionalResponsesV3Args) => Record<string, OasResponse | OasRef<"response">> | undefined;
|
|
15
18
|
type ToResponseV3Args = {
|
|
16
19
|
response: OpenAPIV3.ReferenceObject | OpenAPIV3.ResponseObject;
|
|
20
|
+
stackTrail: StackTrail;
|
|
17
21
|
context: ParseContextType;
|
|
18
22
|
};
|
|
19
|
-
export declare const toResponseV3: ({ response, context }: ToResponseV3Args) => OasResponse | OasRef<"response">;
|
|
23
|
+
export declare const toResponseV3: ({ response, stackTrail, context }: ToResponseV3Args) => OasResponse | OasRef<"response">;
|
|
20
24
|
export {};
|
|
21
25
|
//# sourceMappingURL=toResponseV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,oCAI3B,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAuBrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,oCAInC,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,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,mCAI1B,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAuBpD,CAAA"}
|
|
@@ -11,13 +11,12 @@ const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
|
|
|
11
11
|
const Response_js_1 = require("./Response.js");
|
|
12
12
|
const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
|
|
13
13
|
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
14
|
-
const
|
|
15
|
-
const toResponsesV3 = ({ responses, context }) => {
|
|
14
|
+
const toResponsesV3 = ({ responses, stackTrail, context }) => {
|
|
16
15
|
const output = {};
|
|
17
16
|
const entries = Object.entries(responses);
|
|
18
17
|
for (const [key, value] of entries) {
|
|
19
18
|
try {
|
|
20
|
-
output[key] =
|
|
19
|
+
output[key] = stackTrail.trace(key, st => (0, exports.toResponseV3)({ response: value, stackTrail: st, context }));
|
|
21
20
|
}
|
|
22
21
|
catch (error) {
|
|
23
22
|
(0, tiny_invariant_1.default)(error instanceof Error, 'Invalid error');
|
|
@@ -26,6 +25,7 @@ const toResponsesV3 = ({ responses, context }) => {
|
|
|
26
25
|
level: 'error',
|
|
27
26
|
error,
|
|
28
27
|
parent: value,
|
|
28
|
+
stackTrail,
|
|
29
29
|
type: 'INVALID_RESPONSE'
|
|
30
30
|
});
|
|
31
31
|
}
|
|
@@ -33,28 +33,29 @@ const toResponsesV3 = ({ responses, context }) => {
|
|
|
33
33
|
return output;
|
|
34
34
|
};
|
|
35
35
|
exports.toResponsesV3 = toResponsesV3;
|
|
36
|
-
const toOptionalResponsesV3 = ({ responses, context }) => {
|
|
36
|
+
const toOptionalResponsesV3 = ({ responses, stackTrail, context }) => {
|
|
37
37
|
if (!responses) {
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
|
-
return (0, exports.toResponsesV3)({ responses, context });
|
|
40
|
+
return (0, exports.toResponsesV3)({ responses, stackTrail, context });
|
|
41
41
|
};
|
|
42
42
|
exports.toOptionalResponsesV3 = toOptionalResponsesV3;
|
|
43
|
-
const toResponseV3 = ({ response, context }) => {
|
|
43
|
+
const toResponseV3 = ({ response, stackTrail, context }) => {
|
|
44
44
|
if ((0, refFns_js_1.isRef)(response)) {
|
|
45
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: response, refType: 'response', context });
|
|
45
|
+
return (0, toRefV31_js_1.toRefV31)({ ref: response, refType: 'response', stackTrail, context });
|
|
46
46
|
}
|
|
47
47
|
const { description, headers, content, ...skipped } = response;
|
|
48
48
|
const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
|
|
49
49
|
skipped,
|
|
50
50
|
parent: response,
|
|
51
51
|
context,
|
|
52
|
+
stackTrail,
|
|
52
53
|
parentType: 'response'
|
|
53
54
|
});
|
|
54
55
|
return new Response_js_1.OasResponse({
|
|
55
56
|
description,
|
|
56
|
-
headers:
|
|
57
|
-
content:
|
|
57
|
+
headers: stackTrail.trace('headers', st => (0, toHeadersV3_js_1.toHeadersV3)({ headers, stackTrail: st, context })),
|
|
58
|
+
content: stackTrail.trace('content', st => (0, toMediaTypeItemV3_js_1.toOptionalMediaTypeItemsV3)({ content, stackTrail: st, context })),
|
|
58
59
|
extensionFields
|
|
59
60
|
});
|
|
60
61
|
};
|
|
@@ -2,25 +2,30 @@ import type { ParseContextType } from '../../context/parseTypes.js';
|
|
|
2
2
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
3
|
import type { OasSchema } from './Schema.js';
|
|
4
4
|
import type { OasRef } from '../ref/Ref.js';
|
|
5
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
5
6
|
type ToSchemasV3Args = {
|
|
6
7
|
schemas: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject>;
|
|
8
|
+
stackTrail: StackTrail;
|
|
7
9
|
context: ParseContextType;
|
|
8
10
|
};
|
|
9
|
-
export declare const toSchemasV3: ({ schemas, context }: ToSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">>;
|
|
11
|
+
export declare const toSchemasV3: ({ schemas, stackTrail, context }: ToSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">>;
|
|
10
12
|
type ToOptionalSchemasV3Args = {
|
|
11
13
|
schemas: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject> | undefined;
|
|
14
|
+
stackTrail: StackTrail;
|
|
12
15
|
context: ParseContextType;
|
|
13
16
|
};
|
|
14
|
-
export declare const toOptionalSchemasV3: ({ schemas, context }: ToOptionalSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">> | undefined;
|
|
17
|
+
export declare const toOptionalSchemasV3: ({ schemas, stackTrail, context }: ToOptionalSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">> | undefined;
|
|
15
18
|
type ToSchemaV3Args = {
|
|
16
19
|
schema: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject;
|
|
20
|
+
stackTrail: StackTrail;
|
|
17
21
|
context: ParseContextType;
|
|
18
22
|
};
|
|
19
|
-
export declare const toSchemaV3: ({ schema, context }: ToSchemaV3Args) => OasSchema | OasRef<"schema">;
|
|
23
|
+
export declare const toSchemaV3: ({ schema, stackTrail, context }: ToSchemaV3Args) => OasSchema | OasRef<"schema">;
|
|
20
24
|
type ToOptionalSchemaV3Args = {
|
|
21
25
|
schema: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | undefined;
|
|
26
|
+
stackTrail: StackTrail;
|
|
22
27
|
context: ParseContextType;
|
|
23
28
|
};
|
|
24
|
-
export declare const toOptionalSchemaV3: ({ schema, context }: ToOptionalSchemaV3Args) => OasSchema | OasRef<"schema"> | undefined;
|
|
29
|
+
export declare const toOptionalSchemaV3: ({ schema, stackTrail, context }: ToOptionalSchemaV3Args) => OasSchema | OasRef<"schema"> | undefined;
|
|
25
30
|
export {};
|
|
26
31
|
//# sourceMappingURL=toSchemasV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAa3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;IAC3E,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,kCAIzB,eAAe,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAsB/D,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAA;IACvF,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,kCAIjC,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAM3E,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAA;IAC1D,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,iCAIxB,cAAc,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAiK9C,CAAA;AA+CD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAIhC,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
|
|
@@ -19,13 +19,12 @@ const refFns_js_2 = require("../../helpers/refFns.js");
|
|
|
19
19
|
const merge_intersection_js_1 = require("../_merge-all-of/merge-intersection.js");
|
|
20
20
|
const merge_union_js_1 = require("../_merge-all-of/merge-union.js");
|
|
21
21
|
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
22
|
-
const
|
|
23
|
-
const toSchemasV3 = ({ schemas, context }) => {
|
|
22
|
+
const toSchemasV3 = ({ schemas, stackTrail, context }) => {
|
|
24
23
|
const output = {};
|
|
25
24
|
const entries = Object.entries(schemas);
|
|
26
25
|
for (const [key, schema] of entries) {
|
|
27
26
|
try {
|
|
28
|
-
output[key] =
|
|
27
|
+
output[key] = stackTrail.trace(key, st => (0, exports.toSchemaV3)({ schema, stackTrail: st, context }));
|
|
29
28
|
}
|
|
30
29
|
catch (error) {
|
|
31
30
|
(0, tiny_invariant_1.default)(error instanceof Error, 'Invalid error');
|
|
@@ -34,6 +33,7 @@ const toSchemasV3 = ({ schemas, context }) => {
|
|
|
34
33
|
level: 'error',
|
|
35
34
|
error,
|
|
36
35
|
parent: schema,
|
|
36
|
+
stackTrail,
|
|
37
37
|
type: 'INVALID_SCHEMA'
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -41,29 +41,29 @@ const toSchemasV3 = ({ schemas, context }) => {
|
|
|
41
41
|
return output;
|
|
42
42
|
};
|
|
43
43
|
exports.toSchemasV3 = toSchemasV3;
|
|
44
|
-
const toOptionalSchemasV3 = ({ schemas, context }) => {
|
|
44
|
+
const toOptionalSchemasV3 = ({ schemas, stackTrail, context }) => {
|
|
45
45
|
if (!schemas) {
|
|
46
46
|
return undefined;
|
|
47
47
|
}
|
|
48
|
-
return (0, exports.toSchemasV3)({ schemas, context });
|
|
48
|
+
return (0, exports.toSchemasV3)({ schemas, stackTrail, context });
|
|
49
49
|
};
|
|
50
50
|
exports.toOptionalSchemasV3 = toOptionalSchemasV3;
|
|
51
|
-
const toSchemaV3 = ({ schema, context }) => {
|
|
51
|
+
const toSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
52
52
|
if ((0, refFns_js_1.isRef)(schema)) {
|
|
53
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', context });
|
|
53
|
+
return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', stackTrail, context });
|
|
54
54
|
}
|
|
55
55
|
return (0, ts_pattern_1.match)(schema)
|
|
56
56
|
.with({ allOf: ts_pattern_1.P.array() }, schema => {
|
|
57
|
-
return
|
|
57
|
+
return stackTrail.trace('allOf', st => {
|
|
58
58
|
const merged = (0, merge_intersection_js_1.mergeIntersection)({
|
|
59
59
|
schema,
|
|
60
60
|
getRef: (0, refFns_js_2.toGetRef)(context.documentObject)
|
|
61
61
|
});
|
|
62
|
-
return (0, exports.toSchemaV3)({ schema: merged, context });
|
|
62
|
+
return (0, exports.toSchemaV3)({ schema: merged, stackTrail: st, context });
|
|
63
63
|
});
|
|
64
64
|
})
|
|
65
65
|
.with({ oneOf: ts_pattern_1.P.array() }, oneOf => {
|
|
66
|
-
return
|
|
66
|
+
return stackTrail.trace('oneOf', st => {
|
|
67
67
|
const merged = (0, merge_union_js_1.mergeUnion)({
|
|
68
68
|
schema: oneOf,
|
|
69
69
|
getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
|
|
@@ -77,18 +77,18 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
77
77
|
throw new Error('"oneOf" array is empty');
|
|
78
78
|
}
|
|
79
79
|
if (members.length === 1) {
|
|
80
|
-
return (0, exports.toSchemaV3)({ schema: members[0], context });
|
|
80
|
+
return (0, exports.toSchemaV3)({ schema: members[0], stackTrail: st, context });
|
|
81
81
|
}
|
|
82
|
-
return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'oneOf', context });
|
|
82
|
+
return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'oneOf', stackTrail: st, context });
|
|
83
83
|
});
|
|
84
84
|
})
|
|
85
85
|
.with({ anyOf: ts_pattern_1.P.array() }, matched => {
|
|
86
|
-
return
|
|
86
|
+
return stackTrail.trace('anyOf', st => {
|
|
87
87
|
// deno-lint-ignore ban-ts-comment
|
|
88
88
|
// @ts-expect-error
|
|
89
89
|
if (matched['x-expansionResources']) {
|
|
90
90
|
const { anyOf, ...value } = matched;
|
|
91
|
-
return (0, toUnion_js_1.toUnion)({ value, members: anyOf, parentType: 'anyOf', context });
|
|
91
|
+
return (0, toUnion_js_1.toUnion)({ value, members: anyOf, parentType: 'anyOf', stackTrail: st, context });
|
|
92
92
|
}
|
|
93
93
|
const merged = (0, merge_union_js_1.mergeUnion)({
|
|
94
94
|
schema: matched,
|
|
@@ -103,23 +103,24 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
103
103
|
throw new Error('"anyOf" array is empty');
|
|
104
104
|
}
|
|
105
105
|
if (members.length === 1) {
|
|
106
|
-
return (0, exports.toSchemaV3)({ schema: members[0], context });
|
|
106
|
+
return (0, exports.toSchemaV3)({ schema: members[0], stackTrail: st, context });
|
|
107
107
|
}
|
|
108
|
-
return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'anyOf', context });
|
|
108
|
+
return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'anyOf', stackTrail: st, context });
|
|
109
109
|
});
|
|
110
110
|
})
|
|
111
|
-
.with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, context }))
|
|
112
|
-
.with({ type: 'array' }, value => (0, toArray_js_1.toArray)({ value, context }))
|
|
113
|
-
.with({ type: 'integer' }, value => (0, toInteger_js_1.toInteger)({ value, context }))
|
|
114
|
-
.with({ type: 'number' }, value => (0, toNumber_js_1.toNumber)({ value, context }))
|
|
115
|
-
.with({ type: 'boolean' }, value => (0, toBoolean_js_1.toBoolean)({ value, context }))
|
|
116
|
-
.with({ type: 'string' }, value => (0, toString_js_1.toString)({ value, context }))
|
|
111
|
+
.with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, stackTrail, context }))
|
|
112
|
+
.with({ type: 'array' }, value => (0, toArray_js_1.toArray)({ value, stackTrail, context }))
|
|
113
|
+
.with({ type: 'integer' }, value => (0, toInteger_js_1.toInteger)({ value, stackTrail, context }))
|
|
114
|
+
.with({ type: 'number' }, value => (0, toNumber_js_1.toNumber)({ value, stackTrail, context }))
|
|
115
|
+
.with({ type: 'boolean' }, value => (0, toBoolean_js_1.toBoolean)({ value, stackTrail, context }))
|
|
116
|
+
.with({ type: 'string' }, value => (0, toString_js_1.toString)({ value, stackTrail, context }))
|
|
117
117
|
.otherwise(value => {
|
|
118
118
|
if (possibleObject(value)) {
|
|
119
119
|
context.logIssueNoKey({
|
|
120
120
|
level: 'warning',
|
|
121
121
|
message: 'Object has "properties" property, but is missing type="object" property',
|
|
122
122
|
parent: value,
|
|
123
|
+
stackTrail,
|
|
123
124
|
type: 'MISSING_OBJECT_TYPE'
|
|
124
125
|
});
|
|
125
126
|
return (0, toObject_js_1.toObject)({
|
|
@@ -127,6 +128,7 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
127
128
|
...value,
|
|
128
129
|
type: 'object'
|
|
129
130
|
},
|
|
131
|
+
stackTrail,
|
|
130
132
|
context
|
|
131
133
|
});
|
|
132
134
|
}
|
|
@@ -135,6 +137,7 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
135
137
|
level: 'warning',
|
|
136
138
|
message: 'Object has "items" property, but is missing type="array" property',
|
|
137
139
|
parent: value,
|
|
140
|
+
stackTrail,
|
|
138
141
|
type: 'MISSING_ARRAY_TYPE'
|
|
139
142
|
});
|
|
140
143
|
return (0, toArray_js_1.toArray)({
|
|
@@ -143,6 +146,7 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
143
146
|
type: 'array'
|
|
144
147
|
// Adding cast here since {} is a valid value for items
|
|
145
148
|
},
|
|
149
|
+
stackTrail,
|
|
146
150
|
context
|
|
147
151
|
});
|
|
148
152
|
}
|
|
@@ -151,6 +155,7 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
151
155
|
level: 'warning',
|
|
152
156
|
message: 'Object has a boolean "default" or "example" property, but is missing type="boolean" property',
|
|
153
157
|
parent: value,
|
|
158
|
+
stackTrail,
|
|
154
159
|
type: 'MISSING_BOOLEAN_TYPE'
|
|
155
160
|
});
|
|
156
161
|
return (0, toBoolean_js_1.toBoolean)({
|
|
@@ -158,6 +163,7 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
158
163
|
...value,
|
|
159
164
|
type: 'boolean'
|
|
160
165
|
},
|
|
166
|
+
stackTrail,
|
|
161
167
|
context
|
|
162
168
|
});
|
|
163
169
|
}
|
|
@@ -166,6 +172,7 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
166
172
|
level: 'warning',
|
|
167
173
|
message: 'Object has a string "default" or "example" property, but is missing type="string" property',
|
|
168
174
|
parent: value,
|
|
175
|
+
stackTrail,
|
|
169
176
|
type: 'MISSING_STRING_TYPE'
|
|
170
177
|
});
|
|
171
178
|
return (0, toString_js_1.toString)({
|
|
@@ -173,10 +180,11 @@ const toSchemaV3 = ({ schema, context }) => {
|
|
|
173
180
|
...value,
|
|
174
181
|
type: 'string'
|
|
175
182
|
},
|
|
183
|
+
stackTrail,
|
|
176
184
|
context
|
|
177
185
|
});
|
|
178
186
|
}
|
|
179
|
-
return (0, toUnknown_js_1.toUnknown)({ value, context });
|
|
187
|
+
return (0, toUnknown_js_1.toUnknown)({ value, stackTrail, context });
|
|
180
188
|
});
|
|
181
189
|
};
|
|
182
190
|
exports.toSchemaV3 = toSchemaV3;
|
|
@@ -213,10 +221,10 @@ const possibleObject = (value) => {
|
|
|
213
221
|
typeof value.properties === 'object' &&
|
|
214
222
|
value.properties);
|
|
215
223
|
};
|
|
216
|
-
const toOptionalSchemaV3 = ({ schema, context }) => {
|
|
224
|
+
const toOptionalSchemaV3 = ({ schema, stackTrail, context }) => {
|
|
217
225
|
if (!schema) {
|
|
218
226
|
return undefined;
|
|
219
227
|
}
|
|
220
|
-
return (0, exports.toSchemaV3)({ schema, context });
|
|
228
|
+
return (0, exports.toSchemaV3)({ schema, stackTrail, context });
|
|
221
229
|
};
|
|
222
230
|
exports.toOptionalSchemaV3 = toOptionalSchemaV3;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
2
2
|
import { OasSecurityRequirement } from './SecurityRequirement.js';
|
|
3
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
3
4
|
type ToSecurityRequirementsV3Args = {
|
|
4
5
|
security: Record<string, string[]>[] | undefined;
|
|
6
|
+
stackTrail: StackTrail;
|
|
5
7
|
context: ParseContextType;
|
|
6
8
|
};
|
|
7
|
-
export declare const toSecurityRequirementsV3: ({ security, context }: ToSecurityRequirementsV3Args) => OasSecurityRequirement[] | undefined;
|
|
9
|
+
export declare const toSecurityRequirementsV3: ({ security, stackTrail, context }: ToSecurityRequirementsV3Args) => OasSecurityRequirement[] | undefined;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=toSecurityRequirement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSecurityRequirement.d.ts","sourceRoot":"","sources":["../../../src/oas/securityRequirement/toSecurityRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"toSecurityRequirement.d.ts","sourceRoot":"","sources":["../../../src/oas/securityRequirement/toSecurityRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;IAChD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,mCAItC,4BAA4B,KAAG,sBAAsB,EAAE,GAAG,SAQ5D,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toSecurityRequirementsV3 = void 0;
|
|
4
4
|
const SecurityRequirement_js_1 = require("./SecurityRequirement.js");
|
|
5
|
-
const toSecurityRequirementsV3 = ({ security, context }) => {
|
|
5
|
+
const toSecurityRequirementsV3 = ({ security, stackTrail, context }) => {
|
|
6
6
|
if (!security) {
|
|
7
7
|
return undefined;
|
|
8
8
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
2
|
import type { ParseContextType } from '../../context/parseTypes.js';
|
|
3
3
|
import type { OasSecurityScheme } from './SecurityScheme.js';
|
|
4
|
+
import type { StackTrail } from '../../context/StackTrail.js';
|
|
4
5
|
type ToSecuritySchemesArgs = {
|
|
5
6
|
securitySchemes: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | undefined;
|
|
7
|
+
stackTrail: StackTrail;
|
|
6
8
|
context: ParseContextType;
|
|
7
9
|
};
|
|
8
|
-
export declare const toSecuritySchemesV3: ({ securitySchemes, context }: ToSecuritySchemesArgs) => // 'http' | 'apiKey' | 'oauth2' | 'openIdConnect'
|
|
10
|
+
export declare const toSecuritySchemesV3: ({ securitySchemes, stackTrail, context }: ToSecuritySchemesArgs) => // 'http' | 'apiKey' | 'oauth2' | 'openIdConnect'
|
|
9
11
|
Record<string, OasSecurityScheme> | undefined;
|
|
10
12
|
export {};
|
|
11
13
|
//# sourceMappingURL=toSecuritySchemes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSecuritySchemes.d.ts","sourceRoot":"","sources":["../../../src/oas/securitySchemes/toSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAgBnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"toSecuritySchemes.d.ts","sourceRoot":"","sources":["../../../src/oas/securitySchemes/toSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAgBnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAK5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,qBAAqB,GAAG;IAC3B,eAAe,EACX,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,oBAAoB,CAAC,GAC1E,SAAS,CAAA;IACb,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,0CAIjC,qBAAqB,KACxB,AAD2B,iDAAiD;AAC5E,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,SAenC,CAAA"}
|
|
@@ -40,29 +40,33 @@ const v = __importStar(require("valibot"));
|
|
|
40
40
|
const security_scheme_types_js_1 = require("./security-scheme-types.js");
|
|
41
41
|
const toRefV31_js_1 = require("../ref/toRefV31.js");
|
|
42
42
|
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
43
|
-
const tracer_js_1 = require("../../helpers/tracer.js");
|
|
44
43
|
const isEmpty_js_1 = require("../../helpers/isEmpty.js");
|
|
45
|
-
const toSecuritySchemesV3 = ({ securitySchemes, context }) => {
|
|
44
|
+
const toSecuritySchemesV3 = ({ securitySchemes, stackTrail, context }) => {
|
|
46
45
|
if (!securitySchemes) {
|
|
47
46
|
return undefined;
|
|
48
47
|
}
|
|
49
48
|
return Object.fromEntries(Object.entries(securitySchemes).map(([key, value]) => {
|
|
50
49
|
return [
|
|
51
50
|
key,
|
|
52
|
-
|
|
51
|
+
stackTrail.trace(key, st => toSecuritySchemeV3({ securityScheme: value, stackTrail: st, context }))
|
|
53
52
|
];
|
|
54
53
|
}));
|
|
55
54
|
};
|
|
56
55
|
exports.toSecuritySchemesV3 = toSecuritySchemesV3;
|
|
57
|
-
const toSecuritySchemeV3 = ({ securityScheme, context }) => {
|
|
56
|
+
const toSecuritySchemeV3 = ({ securityScheme, stackTrail, context }) => {
|
|
58
57
|
if ((0, refFns_js_1.isRef)(securityScheme)) {
|
|
59
|
-
return (0, toRefV31_js_1.toRefV31)({ ref: securityScheme, refType: 'securityScheme', context });
|
|
58
|
+
return (0, toRefV31_js_1.toRefV31)({ ref: securityScheme, refType: 'securityScheme', stackTrail, context });
|
|
60
59
|
}
|
|
61
60
|
return (0, ts_pattern_1.match)(securityScheme)
|
|
62
61
|
.with({ type: 'http' }, matched => {
|
|
63
62
|
const { type: _type, description, scheme, bearerFormat, ...skipped } = v.parse(security_scheme_types_js_1.oasHttpSecuritySchemeData, matched);
|
|
64
63
|
if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
|
|
65
|
-
context.logSkippedFields({
|
|
64
|
+
context.logSkippedFields({
|
|
65
|
+
skipped,
|
|
66
|
+
parent: matched,
|
|
67
|
+
stackTrail,
|
|
68
|
+
parentType: 'securityScheme:http'
|
|
69
|
+
});
|
|
66
70
|
}
|
|
67
71
|
return new SecurityScheme_js_1.OasHttpSecurityScheme({
|
|
68
72
|
description,
|
|
@@ -73,7 +77,12 @@ const toSecuritySchemeV3 = ({ securityScheme, context }) => {
|
|
|
73
77
|
.with({ type: 'apiKey' }, matched => {
|
|
74
78
|
const { type: _type, in: location, description, name, ...skipped } = v.parse(security_scheme_types_js_1.oasApiKeySecuritySchemeData, matched);
|
|
75
79
|
if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
|
|
76
|
-
context.logSkippedFields({
|
|
80
|
+
context.logSkippedFields({
|
|
81
|
+
skipped,
|
|
82
|
+
parent: matched,
|
|
83
|
+
stackTrail,
|
|
84
|
+
parentType: 'securityScheme:apiKey'
|
|
85
|
+
});
|
|
77
86
|
}
|
|
78
87
|
return new SecurityScheme_js_1.OasApiKeySecurityScheme({
|
|
79
88
|
description,
|
|
@@ -84,7 +93,12 @@ const toSecuritySchemeV3 = ({ securityScheme, context }) => {
|
|
|
84
93
|
.with({ type: 'oauth2' }, matched => {
|
|
85
94
|
const { type: _type, flows, description, ...skipped } = v.parse(security_scheme_types_js_1.oasOAuth2SecuritySchemeData, matched);
|
|
86
95
|
if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
|
|
87
|
-
context.logSkippedFields({
|
|
96
|
+
context.logSkippedFields({
|
|
97
|
+
skipped,
|
|
98
|
+
parent: matched,
|
|
99
|
+
stackTrail,
|
|
100
|
+
parentType: 'securityScheme:oauth2'
|
|
101
|
+
});
|
|
88
102
|
}
|
|
89
103
|
return new SecurityScheme_js_1.OasOAuth2SecurityScheme({
|
|
90
104
|
description,
|
|
@@ -97,6 +111,7 @@ const toSecuritySchemeV3 = ({ securityScheme, context }) => {
|
|
|
97
111
|
context.logSkippedFields({
|
|
98
112
|
skipped,
|
|
99
113
|
parent: matched,
|
|
114
|
+
stackTrail,
|
|
100
115
|
parentType: 'securityScheme:openIdConnect'
|
|
101
116
|
});
|
|
102
117
|
}
|