@skmtc/core 0.0.332 → 0.0.333
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/_dnt.test_shims.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/almost_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/array_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/fail.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/greater.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/less.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/never.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/object_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/string_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/throws.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/unimplemented.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.4/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.3/types.d.ts.map +1 -0
- package/esm/oas/document/Document.d.ts +2 -2
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/info/Info.d.ts +4 -4
- package/esm/oas/info/Info.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.d.ts +5 -6
- package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.js +21 -24
- package/esm/oas/object/Object.d.ts +10 -11
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +55 -42
- package/esm/oas/object/toObject.js +1 -1
- package/esm/oas/operation/Operation.d.ts +18 -19
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +77 -48
- package/esm/oas/operation/mocks.d.ts.map +1 -0
- package/esm/oas/operation/toOperationsV3.d.ts +1 -1
- package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/esm/oas/operation/toOperationsV3.js +3 -3
- package/esm/oas/operation/toOperationsV3.test.d.ts.map +1 -0
- package/esm/oas/parameter/Parameter.d.ts +20 -21
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +87 -52
- package/esm/oas/pathItem/PathItem.d.ts +7 -8
- package/esm/oas/pathItem/PathItem.d.ts.map +1 -1
- package/esm/oas/pathItem/PathItem.js +22 -25
- package/esm/oas/ref/Ref.d.ts +1 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +7 -9
- package/esm/oas/requestBody/RequestBody.d.ts +5 -6
- package/esm/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/esm/oas/requestBody/RequestBody.js +22 -25
- package/esm/oas/response/Response.d.ts +7 -8
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +23 -26
- package/esm/test/mockParseContext.d.ts.map +1 -0
- package/package.json +1 -1
- package/script/_dnt.test_shims.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/almost_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/array_includes.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/fail.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/greater.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/greater_or_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/less.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/less_or_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/never.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/not_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/not_instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/not_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/not_strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/object_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/rejects.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/string_includes.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/throws.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/unimplemented.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.4/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.3/types.d.ts.map +1 -0
- package/script/oas/document/Document.d.ts +2 -2
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/info/Info.d.ts +4 -4
- package/script/oas/info/Info.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.d.ts +5 -6
- package/script/oas/mediaType/MediaType.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.js +21 -24
- package/script/oas/object/Object.d.ts +10 -11
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +55 -42
- package/script/oas/object/toObject.js +1 -1
- package/script/oas/operation/Operation.d.ts +18 -19
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +77 -48
- package/script/oas/operation/mocks.d.ts.map +1 -0
- package/script/oas/operation/toOperationsV3.d.ts +1 -1
- package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
- package/script/oas/operation/toOperationsV3.js +3 -3
- package/script/oas/operation/toOperationsV3.test.d.ts.map +1 -0
- package/script/oas/parameter/Parameter.d.ts +20 -21
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +87 -52
- package/script/oas/pathItem/PathItem.d.ts +7 -8
- package/script/oas/pathItem/PathItem.d.ts.map +1 -1
- package/script/oas/pathItem/PathItem.js +22 -25
- package/script/oas/ref/Ref.d.ts +1 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +7 -9
- package/script/oas/requestBody/RequestBody.d.ts +5 -6
- package/script/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/script/oas/requestBody/RequestBody.js +22 -25
- package/script/oas/response/Response.d.ts +7 -8
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +23 -26
- package/script/test/mockParseContext.d.ts.map +1 -0
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
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");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
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");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _OasObject_fields;
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.OasObject = void 0;
|
|
16
4
|
class OasObject {
|
|
@@ -27,8 +15,48 @@ class OasObject {
|
|
|
27
15
|
writable: true,
|
|
28
16
|
value: 'object'
|
|
29
17
|
});
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
Object.defineProperty(this, "title", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: void 0
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "description", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: void 0
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "properties", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "required", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "additionalProperties", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: void 0
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(this, "nullable", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: void 0
|
|
53
|
+
});
|
|
54
|
+
this.title = fields.title;
|
|
55
|
+
this.description = fields.description;
|
|
56
|
+
this.properties = fields.properties;
|
|
57
|
+
this.required = fields.required;
|
|
58
|
+
this.additionalProperties = fields.additionalProperties;
|
|
59
|
+
this.nullable = fields.nullable;
|
|
32
60
|
}
|
|
33
61
|
/** Creates new empty OasObject */
|
|
34
62
|
static empty() {
|
|
@@ -37,48 +65,34 @@ class OasObject {
|
|
|
37
65
|
required: []
|
|
38
66
|
});
|
|
39
67
|
}
|
|
40
|
-
get title() {
|
|
41
|
-
return __classPrivateFieldGet(this, _OasObject_fields, "f").title;
|
|
42
|
-
}
|
|
43
|
-
get description() {
|
|
44
|
-
return __classPrivateFieldGet(this, _OasObject_fields, "f").description;
|
|
45
|
-
}
|
|
46
|
-
get properties() {
|
|
47
|
-
return __classPrivateFieldGet(this, _OasObject_fields, "f").properties;
|
|
48
|
-
}
|
|
49
|
-
get required() {
|
|
50
|
-
return __classPrivateFieldGet(this, _OasObject_fields, "f").required;
|
|
51
|
-
}
|
|
52
|
-
get additionalProperties() {
|
|
53
|
-
return __classPrivateFieldGet(this, _OasObject_fields, "f").additionalProperties;
|
|
54
|
-
}
|
|
55
|
-
get nullable() {
|
|
56
|
-
return __classPrivateFieldGet(this, _OasObject_fields, "f").nullable;
|
|
57
|
-
}
|
|
58
68
|
addProperty({ name, schema, required }) {
|
|
59
69
|
if (!schema) {
|
|
60
70
|
return this;
|
|
61
71
|
}
|
|
62
72
|
return new OasObject({
|
|
63
|
-
|
|
73
|
+
title: this.title,
|
|
74
|
+
description: this.description,
|
|
64
75
|
properties: {
|
|
65
|
-
...
|
|
76
|
+
...this.properties,
|
|
66
77
|
[name]: schema
|
|
67
78
|
},
|
|
68
|
-
required: required
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
required: required ? [...(this.required ?? []), name] : this.required,
|
|
80
|
+
additionalProperties: this.additionalProperties,
|
|
81
|
+
nullable: this.nullable
|
|
71
82
|
});
|
|
72
83
|
}
|
|
73
84
|
removeProperty({ name }) {
|
|
74
|
-
if (!
|
|
85
|
+
if (!this.properties?.[name]) {
|
|
75
86
|
return this;
|
|
76
87
|
}
|
|
77
|
-
const { [name]: _removed, ...properties } =
|
|
88
|
+
const { [name]: _removed, ...properties } = this.properties;
|
|
78
89
|
return new OasObject({
|
|
79
|
-
|
|
90
|
+
title: this.title,
|
|
91
|
+
description: this.description,
|
|
80
92
|
properties,
|
|
81
|
-
required:
|
|
93
|
+
required: this.required?.filter(n => n !== name),
|
|
94
|
+
additionalProperties: this.additionalProperties,
|
|
95
|
+
nullable: this.nullable
|
|
82
96
|
});
|
|
83
97
|
}
|
|
84
98
|
isRef() {
|
|
@@ -92,4 +106,3 @@ class OasObject {
|
|
|
92
106
|
}
|
|
93
107
|
}
|
|
94
108
|
exports.OasObject = OasObject;
|
|
95
|
-
_OasObject_fields = new WeakMap();
|
|
@@ -15,7 +15,7 @@ const toObject = ({ value, context }) => {
|
|
|
15
15
|
schemas: properties,
|
|
16
16
|
context
|
|
17
17
|
})),
|
|
18
|
-
required: required
|
|
18
|
+
required: required,
|
|
19
19
|
additionalProperties: context.trace('additionalProperties', () => (0, toAdditionalPropertiesV3_js_1.toAdditionalPropertiesV3)({ additionalProperties, context }))
|
|
20
20
|
};
|
|
21
21
|
return new Object_js_1.OasObject(fields);
|
|
@@ -11,14 +11,14 @@ export type OperationFields = {
|
|
|
11
11
|
path: string;
|
|
12
12
|
method: Method;
|
|
13
13
|
pathItem: OasPathItem;
|
|
14
|
-
operationId
|
|
15
|
-
summary
|
|
16
|
-
tags
|
|
17
|
-
description
|
|
18
|
-
parameters
|
|
19
|
-
requestBody
|
|
14
|
+
operationId?: string | undefined;
|
|
15
|
+
summary?: string | undefined;
|
|
16
|
+
tags?: string[] | undefined;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
parameters?: (OasParameter | OasRef<'parameter'>)[] | undefined;
|
|
19
|
+
requestBody?: OasRequestBody | OasRef<'requestBody'> | undefined;
|
|
20
20
|
responses: Record<string, OasResponse | OasRef<'response'>>;
|
|
21
|
-
deprecated
|
|
21
|
+
deprecated?: boolean | undefined;
|
|
22
22
|
};
|
|
23
23
|
type ToRequestBodyMapArgs = {
|
|
24
24
|
schema: OasSchema | OasRef<'schema'>;
|
|
@@ -26,8 +26,18 @@ type ToRequestBodyMapArgs = {
|
|
|
26
26
|
};
|
|
27
27
|
/** Operation represents a resource path and a method that can be enacted against it */
|
|
28
28
|
export declare class OasOperation {
|
|
29
|
-
#private;
|
|
30
29
|
oasType: 'operation';
|
|
30
|
+
path: string;
|
|
31
|
+
method: Method;
|
|
32
|
+
pathItem: OasPathItem;
|
|
33
|
+
operationId: string | undefined;
|
|
34
|
+
summary: string | undefined;
|
|
35
|
+
tags: string[] | undefined;
|
|
36
|
+
description: string | undefined;
|
|
37
|
+
parameters: (OasParameter | OasRef<'parameter'>)[] | undefined;
|
|
38
|
+
requestBody: OasRequestBody | OasRef<'requestBody'> | undefined;
|
|
39
|
+
responses: Record<string, OasResponse | OasRef<'response'>>;
|
|
40
|
+
deprecated: boolean | undefined;
|
|
31
41
|
constructor(fields: OperationFields);
|
|
32
42
|
toSuccessResponse(): OasResponse | OasRef<'response'>;
|
|
33
43
|
toRequestBody<V>(map: ({ schema, requestBody }: ToRequestBodyMapArgs) => V, mediaType?: string): V | undefined;
|
|
@@ -39,17 +49,6 @@ export declare class OasOperation {
|
|
|
39
49
|
*/
|
|
40
50
|
toParams(filter?: OasParameterLocation[]): OasParameter[];
|
|
41
51
|
toParametersObject(filter?: OasParameterLocation[]): OasObject;
|
|
42
|
-
get path(): string;
|
|
43
|
-
get method(): Method;
|
|
44
|
-
get pathItem(): OasPathItem;
|
|
45
|
-
get operationId(): string | undefined;
|
|
46
|
-
get summary(): string | undefined;
|
|
47
|
-
get tags(): string[] | undefined;
|
|
48
|
-
get description(): string | undefined;
|
|
49
|
-
get parameters(): (OasParameter | OasRef<'parameter'>)[] | undefined;
|
|
50
|
-
get requestBody(): OasRequestBody | OasRef<'requestBody'> | undefined;
|
|
51
|
-
get responses(): Record<string, OasResponse | OasRef<'response'>>;
|
|
52
|
-
get deprecated(): boolean | undefined;
|
|
53
52
|
}
|
|
54
53
|
export {};
|
|
55
54
|
//# sourceMappingURL=Operation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/Operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAA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"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
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");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
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");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _OasOperation_fields;
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.OasOperation = void 0;
|
|
16
4
|
const Object_js_1 = require("../object/Object.js");
|
|
@@ -23,8 +11,83 @@ class OasOperation {
|
|
|
23
11
|
writable: true,
|
|
24
12
|
value: 'operation'
|
|
25
13
|
});
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
Object.defineProperty(this, "path", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: void 0
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(this, "method", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: void 0
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(this, "pathItem", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: void 0
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(this, "operationId", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: void 0
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(this, "summary", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: void 0
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(this, "tags", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: void 0
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(this, "description", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: void 0
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(this, "parameters", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: void 0
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(this, "requestBody", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: void 0
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(this, "responses", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
value: void 0
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(this, "deprecated", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
configurable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
value: void 0
|
|
79
|
+
});
|
|
80
|
+
this.path = fields.path;
|
|
81
|
+
this.method = fields.method;
|
|
82
|
+
this.pathItem = fields.pathItem;
|
|
83
|
+
this.operationId = fields.operationId;
|
|
84
|
+
this.summary = fields.summary;
|
|
85
|
+
this.tags = fields.tags;
|
|
86
|
+
this.description = fields.description;
|
|
87
|
+
this.parameters = fields.parameters;
|
|
88
|
+
this.requestBody = fields.requestBody;
|
|
89
|
+
this.responses = fields.responses;
|
|
90
|
+
this.deprecated = fields.deprecated;
|
|
28
91
|
}
|
|
29
92
|
toSuccessResponse() {
|
|
30
93
|
const { default: defaultResponse, ...httpCodeResponses } = this.responses;
|
|
@@ -60,39 +123,5 @@ class OasOperation {
|
|
|
60
123
|
});
|
|
61
124
|
}, Object_js_1.OasObject.empty());
|
|
62
125
|
}
|
|
63
|
-
get path() {
|
|
64
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").path;
|
|
65
|
-
}
|
|
66
|
-
get method() {
|
|
67
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").method;
|
|
68
|
-
}
|
|
69
|
-
get pathItem() {
|
|
70
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").pathItem;
|
|
71
|
-
}
|
|
72
|
-
get operationId() {
|
|
73
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").operationId;
|
|
74
|
-
}
|
|
75
|
-
get summary() {
|
|
76
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").summary;
|
|
77
|
-
}
|
|
78
|
-
get tags() {
|
|
79
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").tags;
|
|
80
|
-
}
|
|
81
|
-
get description() {
|
|
82
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").description;
|
|
83
|
-
}
|
|
84
|
-
get parameters() {
|
|
85
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").parameters;
|
|
86
|
-
}
|
|
87
|
-
get requestBody() {
|
|
88
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").requestBody;
|
|
89
|
-
}
|
|
90
|
-
get responses() {
|
|
91
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").responses;
|
|
92
|
-
}
|
|
93
|
-
get deprecated() {
|
|
94
|
-
return __classPrivateFieldGet(this, _OasOperation_fields, "f").deprecated;
|
|
95
|
-
}
|
|
96
126
|
}
|
|
97
127
|
exports.OasOperation = OasOperation;
|
|
98
|
-
_OasOperation_fields = new WeakMap();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,eAAO,MAAM,SAAS,EAAE,SAAS,CAAC,WA+IjC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
import {
|
|
2
|
+
import type { Method } from '../../types/Method.js';
|
|
3
3
|
import type { ParseContext } from '../../context/ParseContext.js';
|
|
4
4
|
import { OasOperation } from './Operation.js';
|
|
5
5
|
import type { OasPathItem } from '../pathItem/PathItem.js';
|
|
@@ -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,
|
|
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;AAG7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG1D,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,YAqCtB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,SAAS,CAAC,WAAW,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,cAAc,uBAGxB,kBAAkB,KAAG,YAAY,EAsDnC,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toOperationsV3 = exports.toOperationV3 = void 0;
|
|
4
|
-
const Method_js_1 = require("../../types/Method.js");
|
|
5
4
|
const toRequestBodiesV3_js_1 = require("../requestBody/toRequestBodiesV3.js");
|
|
6
5
|
const toResponseV3_js_1 = require("../response/toResponseV3.js");
|
|
7
6
|
const toParameterV3_js_1 = require("../parameter/toParameterV3.js");
|
|
8
7
|
const Operation_js_1 = require("./Operation.js");
|
|
9
8
|
const toPathItemV3_js_1 = require("../pathItem/toPathItemV3.js");
|
|
9
|
+
const Method_js_1 = require("../../types/Method.js");
|
|
10
10
|
const toOperationV3 = ({ operation, operationInfo, context }) => {
|
|
11
11
|
const { method, path, pathItem } = operationInfo;
|
|
12
12
|
const { operationId, tags, summary, description, parameters, requestBody, responses, deprecated, ...skipped } = operation;
|
|
@@ -36,12 +36,12 @@ const toOperationsV3 = ({ paths, context }) => {
|
|
|
36
36
|
const cleaned = Object.entries(pathItem).reduce(({ rest, methodObject }, [key, operation]) => {
|
|
37
37
|
const isMethod = Method_js_1.methodValues.includes(key);
|
|
38
38
|
if (isMethod) {
|
|
39
|
-
const { [key]:
|
|
39
|
+
const { [key]: _deleted, ...remaining } = rest;
|
|
40
40
|
return {
|
|
41
41
|
rest: remaining,
|
|
42
42
|
methodObject: {
|
|
43
43
|
...methodObject,
|
|
44
|
-
[
|
|
44
|
+
[key]: operation
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toOperationsV3.test.d.ts","sourceRoot":"","sources":["../../../src/oas/operation/toOperationsV3.test.ts"],"names":[],"mappings":""}
|
|
@@ -6,33 +6,32 @@ import type { OasSchema } from '../schema/Schema.js';
|
|
|
6
6
|
export type ParameterFields = {
|
|
7
7
|
name: string;
|
|
8
8
|
location: OasParameterLocation;
|
|
9
|
-
description
|
|
10
|
-
required
|
|
11
|
-
deprecated
|
|
12
|
-
allowEmptyValue
|
|
13
|
-
allowReserved
|
|
14
|
-
schema
|
|
15
|
-
examples
|
|
16
|
-
content
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
required?: boolean | undefined;
|
|
11
|
+
deprecated?: boolean | undefined;
|
|
12
|
+
allowEmptyValue?: boolean | undefined;
|
|
13
|
+
allowReserved?: boolean | undefined;
|
|
14
|
+
schema?: OasSchema | OasRef<'schema'> | undefined;
|
|
15
|
+
examples?: Record<string, OasExample | OasRef<'example'>> | undefined;
|
|
16
|
+
content?: Record<string, OasMediaType> | undefined;
|
|
17
17
|
style: OasParameterStyle;
|
|
18
18
|
explode: boolean;
|
|
19
19
|
};
|
|
20
20
|
export declare class OasParameter {
|
|
21
|
-
#private;
|
|
22
21
|
oasType: 'parameter';
|
|
22
|
+
name: string;
|
|
23
|
+
location: OasParameterLocation;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
required?: boolean | undefined;
|
|
26
|
+
deprecated?: boolean | undefined;
|
|
27
|
+
allowEmptyValue?: boolean | undefined;
|
|
28
|
+
allowReserved?: boolean | undefined;
|
|
29
|
+
schema?: OasSchema | OasRef<'schema'> | undefined;
|
|
30
|
+
examples?: Record<string, OasExample | OasRef<'example'>> | undefined;
|
|
31
|
+
content?: Record<string, OasMediaType> | undefined;
|
|
32
|
+
style: OasParameterStyle;
|
|
33
|
+
explode: boolean;
|
|
23
34
|
constructor(fields: ParameterFields);
|
|
24
|
-
get name(): string;
|
|
25
|
-
get location(): OasParameterLocation;
|
|
26
|
-
get description(): string | undefined;
|
|
27
|
-
get required(): boolean | undefined;
|
|
28
|
-
get deprecated(): boolean | undefined;
|
|
29
|
-
get allowEmptyValue(): boolean | undefined;
|
|
30
|
-
get schema(): OasSchema | OasRef<'schema'> | undefined;
|
|
31
|
-
get examples(): Record<string, OasExample | OasRef<'example'>> | undefined;
|
|
32
|
-
get content(): Record<string, OasMediaType> | undefined;
|
|
33
|
-
get style(): OasParameterStyle;
|
|
34
|
-
get explode(): boolean;
|
|
35
|
-
get allowReserved(): boolean | undefined;
|
|
36
35
|
isRef(): this is OasRef<'parameter'>;
|
|
37
36
|
resolve(): OasParameter;
|
|
38
37
|
resolveOnce(): OasParameter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../src/oas/parameter/Parameter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAKpD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../../src/oas/parameter/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C,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACrC,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAA;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAA;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,SAAS,CAAA;IAClD,KAAK,EAAE,iBAAiB,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;gBAEJ,MAAM,EAAE,eAAe;IAiBnC,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,WAAW,CAAC;IAIpC,OAAO,IAAI,YAAY;IAIvB,WAAW,IAAI,YAAY;IAI3B,QAAQ,CACN,SAAS,GAAE,MAA2B,GACrC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;CAa5C"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
-
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");
|
|
6
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
-
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");
|
|
11
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
-
};
|
|
13
|
-
var _OasParameter_fields;
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
3
|
exports.OasParameter = void 0;
|
|
16
4
|
class OasParameter {
|
|
@@ -21,44 +9,92 @@ class OasParameter {
|
|
|
21
9
|
writable: true,
|
|
22
10
|
value: 'parameter'
|
|
23
11
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
12
|
+
Object.defineProperty(this, "name", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "location", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: void 0
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "description", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: void 0
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "required", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "deprecated", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "allowEmptyValue", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: void 0
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(this, "allowReserved", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: void 0
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(this, "schema", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: void 0
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(this, "examples", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
value: void 0
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(this, "content", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
configurable: true,
|
|
69
|
+
writable: true,
|
|
70
|
+
value: void 0
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(this, "style", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
configurable: true,
|
|
75
|
+
writable: true,
|
|
76
|
+
value: void 0
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(this, "explode", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
configurable: true,
|
|
81
|
+
writable: true,
|
|
82
|
+
value: void 0
|
|
83
|
+
});
|
|
84
|
+
this.name = fields.name;
|
|
85
|
+
this.location = fields.location;
|
|
86
|
+
this.style = fields.style;
|
|
87
|
+
this.explode = fields.explode;
|
|
88
|
+
this.description = fields.description;
|
|
89
|
+
this.required = fields.required;
|
|
90
|
+
this.deprecated = fields.deprecated;
|
|
91
|
+
this.allowEmptyValue = fields.allowEmptyValue;
|
|
92
|
+
this.allowReserved = fields.allowReserved;
|
|
93
|
+
this.schema = fields.schema;
|
|
94
|
+
this.examples = fields.examples;
|
|
95
|
+
this.content = fields.content;
|
|
96
|
+
this.style = fields.style;
|
|
97
|
+
this.explode = fields.explode;
|
|
62
98
|
}
|
|
63
99
|
isRef() {
|
|
64
100
|
return false;
|
|
@@ -73,7 +109,7 @@ class OasParameter {
|
|
|
73
109
|
if (this.schema) {
|
|
74
110
|
return this.schema;
|
|
75
111
|
}
|
|
76
|
-
const schema =
|
|
112
|
+
const schema = this.content?.[mediaType]?.schema;
|
|
77
113
|
if (!schema) {
|
|
78
114
|
throw new Error(`Schema not found for media type ${mediaType}`);
|
|
79
115
|
}
|
|
@@ -81,4 +117,3 @@ class OasParameter {
|
|
|
81
117
|
}
|
|
82
118
|
}
|
|
83
119
|
exports.OasParameter = OasParameter;
|
|
84
|
-
_OasParameter_fields = new WeakMap();
|