@skmtc/core 0.0.301 → 0.0.303
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/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +1 -1
- package/esm/context/ParseContext.d.ts +2 -1
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +11 -2
- package/esm/context/StackTrail.d.ts.map +1 -1
- package/esm/context/StackTrail.js +2 -6
- package/esm/mod.d.ts +0 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +0 -1
- package/esm/oas/array/Array.d.ts +1 -5
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +1 -1
- package/esm/oas/array/toArray.js +1 -1
- package/esm/oas/boolean/Boolean.d.ts +1 -5
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +1 -1
- package/esm/oas/boolean/toBoolean.js +1 -1
- package/esm/oas/components/Components.d.ts +1 -5
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +1 -1
- package/esm/oas/components/toComponentsV3.js +1 -1
- package/esm/oas/discriminator/Discriminator.d.ts +1 -5
- package/esm/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/esm/oas/discriminator/Discriminator.js +1 -1
- package/esm/oas/discriminator/toDiscriminatorV3.js +1 -1
- package/esm/oas/document/Document.d.ts +2 -5
- package/esm/oas/document/Document.d.ts.map +1 -1
- package/esm/oas/document/Document.js +19 -1
- package/{script/oas/document/toDocumentV3.d.ts → esm/oas/document/toDocumentFieldsV3.d.ts} +3 -3
- package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -0
- package/esm/oas/document/{toDocumentV3.js → toDocumentFieldsV3.js} +2 -3
- package/esm/oas/example/Example.d.ts +1 -5
- package/esm/oas/example/Example.d.ts.map +1 -1
- package/esm/oas/example/Example.js +1 -1
- package/esm/oas/example/toExamplesV3.js +2 -2
- package/esm/oas/header/Header.d.ts +1 -5
- package/esm/oas/header/Header.d.ts.map +1 -1
- package/esm/oas/header/Header.js +1 -1
- package/esm/oas/header/toHeadersV3.js +1 -1
- package/esm/oas/info/Info.d.ts +1 -5
- package/esm/oas/info/Info.d.ts.map +1 -1
- package/esm/oas/info/Info.js +1 -1
- package/esm/oas/info/toInfoV3.js +1 -1
- package/esm/oas/integer/Integer.d.ts +1 -5
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +1 -1
- package/esm/oas/integer/toInteger.js +1 -1
- package/esm/oas/intersection/Intersection.d.ts +1 -5
- package/esm/oas/intersection/Intersection.d.ts.map +1 -1
- package/esm/oas/intersection/Intersection.js +1 -1
- package/esm/oas/intersection/toIntersection.js +1 -1
- package/esm/oas/mediaType/MediaType.d.ts +1 -5
- package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.js +1 -1
- package/esm/oas/mediaType/toMediaTypeItemV3.js +1 -1
- package/esm/oas/number/Number.d.ts +1 -5
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +1 -1
- package/esm/oas/number/toNumber.js +1 -1
- package/esm/oas/object/Object.d.ts +1 -5
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +14 -20
- package/esm/oas/object/toObject.js +1 -1
- package/esm/oas/operation/Operation.d.ts +4 -9
- package/esm/oas/operation/Operation.d.ts.map +1 -1
- package/esm/oas/operation/Operation.js +7 -7
- package/esm/oas/operation/toOperationsV3.js +1 -1
- package/esm/oas/parameter/Parameter.d.ts +1 -5
- package/esm/oas/parameter/Parameter.d.ts.map +1 -1
- package/esm/oas/parameter/Parameter.js +1 -1
- package/esm/oas/parameter/toParameterV3.js +1 -1
- package/esm/oas/pathItem/PathItem.d.ts +1 -5
- package/esm/oas/pathItem/PathItem.d.ts.map +1 -1
- package/esm/oas/pathItem/PathItem.js +1 -1
- package/esm/oas/pathItem/toPathItemV3.js +1 -1
- package/esm/oas/ref/Ref.d.ts +4 -7
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +13 -8
- package/esm/oas/ref/toRefV31.js +1 -1
- package/esm/oas/requestBody/RequestBody.d.ts +1 -5
- package/esm/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/esm/oas/requestBody/RequestBody.js +1 -1
- package/esm/oas/requestBody/toRequestBodiesV3.js +1 -1
- package/esm/oas/response/Response.d.ts +1 -5
- package/esm/oas/response/Response.d.ts.map +1 -1
- package/esm/oas/response/Response.js +1 -1
- package/esm/oas/response/toResponseV3.js +1 -1
- package/esm/oas/string/String.d.ts +1 -5
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +1 -1
- package/esm/oas/string/toString.js +1 -1
- package/esm/oas/tag/Tag.d.ts +1 -5
- package/esm/oas/tag/Tag.d.ts.map +1 -1
- package/esm/oas/tag/Tag.js +1 -1
- package/esm/oas/tag/toTagsV3.js +1 -1
- package/esm/oas/union/Union.d.ts +1 -5
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +1 -1
- package/esm/oas/union/toUnion.js +1 -1
- package/esm/oas/unknown/Unknown.d.ts +1 -5
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +1 -1
- package/esm/oas/unknown/toUnknown.js +1 -1
- package/esm/oas/void/Void.d.ts +1 -5
- package/esm/oas/void/Void.d.ts.map +1 -1
- package/esm/oas/void/Void.js +2 -4
- package/esm/typescript/ReactRouterPathParams.d.ts.map +1 -1
- package/esm/typescript/ReactRouterPathParams.js +1 -3
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +1 -1
- package/script/context/ParseContext.d.ts +2 -1
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +11 -2
- package/script/context/StackTrail.d.ts.map +1 -1
- package/script/context/StackTrail.js +2 -6
- package/script/mod.d.ts +0 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +0 -1
- package/script/oas/array/Array.d.ts +1 -5
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +1 -1
- package/script/oas/array/toArray.js +1 -1
- package/script/oas/boolean/Boolean.d.ts +1 -5
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +1 -1
- package/script/oas/boolean/toBoolean.js +1 -1
- package/script/oas/components/Components.d.ts +1 -5
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +1 -1
- package/script/oas/components/toComponentsV3.js +1 -1
- package/script/oas/discriminator/Discriminator.d.ts +1 -5
- package/script/oas/discriminator/Discriminator.d.ts.map +1 -1
- package/script/oas/discriminator/Discriminator.js +1 -1
- package/script/oas/discriminator/toDiscriminatorV3.js +1 -1
- package/script/oas/document/Document.d.ts +2 -5
- package/script/oas/document/Document.d.ts.map +1 -1
- package/script/oas/document/Document.js +19 -1
- package/{esm/oas/document/toDocumentV3.d.ts → script/oas/document/toDocumentFieldsV3.d.ts} +3 -3
- package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -0
- package/script/oas/document/{toDocumentV3.js → toDocumentFieldsV3.js} +4 -5
- package/script/oas/example/Example.d.ts +1 -5
- package/script/oas/example/Example.d.ts.map +1 -1
- package/script/oas/example/Example.js +1 -1
- package/script/oas/example/toExamplesV3.js +2 -2
- package/script/oas/header/Header.d.ts +1 -5
- package/script/oas/header/Header.d.ts.map +1 -1
- package/script/oas/header/Header.js +1 -1
- package/script/oas/header/toHeadersV3.js +1 -1
- package/script/oas/info/Info.d.ts +1 -5
- package/script/oas/info/Info.d.ts.map +1 -1
- package/script/oas/info/Info.js +1 -1
- package/script/oas/info/toInfoV3.js +1 -1
- package/script/oas/integer/Integer.d.ts +1 -5
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +1 -1
- package/script/oas/integer/toInteger.js +1 -1
- package/script/oas/intersection/Intersection.d.ts +1 -5
- package/script/oas/intersection/Intersection.d.ts.map +1 -1
- package/script/oas/intersection/Intersection.js +1 -1
- package/script/oas/intersection/toIntersection.js +1 -1
- package/script/oas/mediaType/MediaType.d.ts +1 -5
- package/script/oas/mediaType/MediaType.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.js +1 -1
- package/script/oas/mediaType/toMediaTypeItemV3.js +1 -1
- package/script/oas/number/Number.d.ts +1 -5
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +1 -1
- package/script/oas/number/toNumber.js +1 -1
- package/script/oas/object/Object.d.ts +1 -5
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +14 -20
- package/script/oas/object/toObject.js +1 -1
- package/script/oas/operation/Operation.d.ts +4 -9
- package/script/oas/operation/Operation.d.ts.map +1 -1
- package/script/oas/operation/Operation.js +7 -7
- package/script/oas/operation/toOperationsV3.js +1 -1
- package/script/oas/parameter/Parameter.d.ts +1 -5
- package/script/oas/parameter/Parameter.d.ts.map +1 -1
- package/script/oas/parameter/Parameter.js +1 -1
- package/script/oas/parameter/toParameterV3.js +1 -1
- package/script/oas/pathItem/PathItem.d.ts +1 -5
- package/script/oas/pathItem/PathItem.d.ts.map +1 -1
- package/script/oas/pathItem/PathItem.js +1 -1
- package/script/oas/pathItem/toPathItemV3.js +1 -1
- package/script/oas/ref/Ref.d.ts +4 -7
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +13 -8
- package/script/oas/ref/toRefV31.js +1 -1
- package/script/oas/requestBody/RequestBody.d.ts +1 -5
- package/script/oas/requestBody/RequestBody.d.ts.map +1 -1
- package/script/oas/requestBody/RequestBody.js +1 -1
- package/script/oas/requestBody/toRequestBodiesV3.js +1 -1
- package/script/oas/response/Response.d.ts +1 -5
- package/script/oas/response/Response.d.ts.map +1 -1
- package/script/oas/response/Response.js +1 -1
- package/script/oas/response/toResponseV3.js +1 -1
- package/script/oas/string/String.d.ts +1 -5
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +1 -1
- package/script/oas/string/toString.js +1 -1
- package/script/oas/tag/Tag.d.ts +1 -5
- package/script/oas/tag/Tag.d.ts.map +1 -1
- package/script/oas/tag/Tag.js +1 -1
- package/script/oas/tag/toTagsV3.js +1 -1
- package/script/oas/union/Union.d.ts +1 -5
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +1 -1
- package/script/oas/union/toUnion.js +1 -1
- package/script/oas/unknown/Unknown.d.ts +1 -5
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +1 -1
- package/script/oas/unknown/toUnknown.js +1 -1
- package/script/oas/void/Void.d.ts +1 -5
- package/script/oas/void/Void.d.ts.map +1 -1
- package/script/oas/void/Void.js +2 -4
- package/script/typescript/ReactRouterPathParams.d.ts.map +1 -1
- package/script/typescript/ReactRouterPathParams.js +1 -3
- package/esm/context/Trail.d.ts +0 -27
- package/esm/context/Trail.d.ts.map +0 -1
- package/esm/context/Trail.js +0 -114
- package/esm/oas/document/toDocumentV3.d.ts.map +0 -1
- package/script/context/Trail.d.ts +0 -27
- package/script/context/Trail.d.ts.map +0 -1
- package/script/context/Trail.js +0 -118
- package/script/oas/document/toDocumentV3.d.ts.map +0 -1
package/script/oas/void/Void.js
CHANGED
|
@@ -14,7 +14,7 @@ var _OasVoid_fields;
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasVoid = void 0;
|
|
16
16
|
class OasVoid {
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(fields = {}) {
|
|
18
18
|
Object.defineProperty(this, "oasType", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
configurable: true,
|
|
@@ -31,9 +31,7 @@ class OasVoid {
|
|
|
31
31
|
__classPrivateFieldSet(this, _OasVoid_fields, fields, "f");
|
|
32
32
|
}
|
|
33
33
|
static empty() {
|
|
34
|
-
return new OasVoid(
|
|
35
|
-
fields: {}
|
|
36
|
-
});
|
|
34
|
+
return new OasVoid();
|
|
37
35
|
}
|
|
38
36
|
get title() {
|
|
39
37
|
return __classPrivateFieldGet(this, _OasVoid_fields, "f").title;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactRouterPathParams.d.ts","sourceRoot":"","sources":["../../src/typescript/ReactRouterPathParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,WAAW,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,YAAY,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,SAAS,EAAE,MAAM,CAAK;IAEtB,YAAY,EAAE,MAAM,CAAK;IAEzB,SAAS,EAAE,MAAM,CAAK;IAEtB,KAAK,EAAE,MAAM,EAAE,CAAA;gBAEH,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,eAAe,EAChB,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"ReactRouterPathParams.d.ts","sourceRoot":"","sources":["../../src/typescript/ReactRouterPathParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,WAAW,CAAA;IACpB,YAAY,EAAE,YAAY,CAAA;IAC1B,SAAS,EAAE,YAAY,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,qBAAa,qBAAsB,SAAQ,SAAS;IAClD,SAAS,EAAE,MAAM,CAAK;IAEtB,YAAY,EAAE,MAAM,CAAK;IAEzB,SAAS,EAAE,MAAM,CAAK;IAEtB,KAAK,EAAE,MAAM,EAAE,CAAA;gBAEH,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,eAAe,EAChB,EAAE,UAAU;IAwBb,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -29,9 +29,7 @@ class ReactRouterPathParams extends ValueBase_js_1.ValueBase {
|
|
|
29
29
|
writable: true,
|
|
30
30
|
value: void 0
|
|
31
31
|
});
|
|
32
|
-
const names = operation
|
|
33
|
-
.toParams(context.schemaModel, ['path'])
|
|
34
|
-
.map(param => param.name);
|
|
32
|
+
const names = operation.toParams(['path']).map(param => param.name);
|
|
35
33
|
this.names = names;
|
|
36
34
|
if (names.length > 0) {
|
|
37
35
|
this.getParams = `const { ${names.join(', ')} } = useParams()`;
|
package/esm/context/Trail.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
type ConstructorArgs = {
|
|
3
|
-
path?: string[];
|
|
4
|
-
apiPath?: string;
|
|
5
|
-
method?: string;
|
|
6
|
-
schemaRef?: string;
|
|
7
|
-
document?: OpenAPIV3.Document;
|
|
8
|
-
subMethodIndex?: number;
|
|
9
|
-
};
|
|
10
|
-
export declare class Trail {
|
|
11
|
-
path: string[];
|
|
12
|
-
apiPath: string | undefined;
|
|
13
|
-
method: string | undefined;
|
|
14
|
-
schemaRef: string | undefined;
|
|
15
|
-
document: OpenAPIV3.Document | undefined;
|
|
16
|
-
subMethodIndex?: number;
|
|
17
|
-
constructor({ path, apiPath, method, schemaRef, document, subMethodIndex }?: ConstructorArgs);
|
|
18
|
-
add(path: string): Trail;
|
|
19
|
-
addApiPath(apiPath: string): Trail;
|
|
20
|
-
addMethod(method: string): Trail;
|
|
21
|
-
addSchemaRef(schemaRef: string): Trail;
|
|
22
|
-
toSubMethodTrail(): Trail;
|
|
23
|
-
clone(): Trail;
|
|
24
|
-
toString(): string;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=Trail.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trail.d.ts","sourceRoot":"","sources":["../../src/context/Trail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAA;IACxC,cAAc,CAAC,EAAE,MAAM,CAAA;gBAEX,EACV,IAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACf,GAAE,eAAoB;IASvB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAWxB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK;IAWlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK;IAWhC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK;IAWtC,gBAAgB,IAAI,KAAK;IAWzB,KAAK,IAAI,KAAK;IAWd,QAAQ,IAAI,MAAM;CASnB"}
|
package/esm/context/Trail.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
export class Trail {
|
|
2
|
-
constructor({ path = [], apiPath, method, schemaRef, document, subMethodIndex } = {}) {
|
|
3
|
-
Object.defineProperty(this, "path", {
|
|
4
|
-
enumerable: true,
|
|
5
|
-
configurable: true,
|
|
6
|
-
writable: true,
|
|
7
|
-
value: void 0
|
|
8
|
-
});
|
|
9
|
-
Object.defineProperty(this, "apiPath", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: void 0
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(this, "method", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
configurable: true,
|
|
18
|
-
writable: true,
|
|
19
|
-
value: void 0
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(this, "schemaRef", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true,
|
|
25
|
-
value: void 0
|
|
26
|
-
});
|
|
27
|
-
Object.defineProperty(this, "document", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true,
|
|
30
|
-
writable: true,
|
|
31
|
-
value: void 0
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(this, "subMethodIndex", {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
configurable: true,
|
|
36
|
-
writable: true,
|
|
37
|
-
value: void 0
|
|
38
|
-
});
|
|
39
|
-
this.path = Array.isArray(path) ? path : [path];
|
|
40
|
-
this.apiPath = apiPath;
|
|
41
|
-
this.method = method;
|
|
42
|
-
this.schemaRef = schemaRef;
|
|
43
|
-
this.document = document;
|
|
44
|
-
this.subMethodIndex = subMethodIndex;
|
|
45
|
-
}
|
|
46
|
-
add(path) {
|
|
47
|
-
return new Trail({
|
|
48
|
-
path: this.path.concat(path),
|
|
49
|
-
apiPath: this.apiPath,
|
|
50
|
-
method: this.method,
|
|
51
|
-
schemaRef: this.schemaRef,
|
|
52
|
-
document: this.document,
|
|
53
|
-
subMethodIndex: this.subMethodIndex
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
addApiPath(apiPath) {
|
|
57
|
-
return new Trail({
|
|
58
|
-
path: this.path.concat(`[${apiPath}]`),
|
|
59
|
-
apiPath,
|
|
60
|
-
method: this.method,
|
|
61
|
-
schemaRef: this.schemaRef,
|
|
62
|
-
document: this.document,
|
|
63
|
-
subMethodIndex: this.subMethodIndex
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
addMethod(method) {
|
|
67
|
-
return new Trail({
|
|
68
|
-
path: this.path.concat(method),
|
|
69
|
-
apiPath: this.apiPath,
|
|
70
|
-
method,
|
|
71
|
-
schemaRef: this.schemaRef,
|
|
72
|
-
document: this.document,
|
|
73
|
-
subMethodIndex: this.path.length + 1
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
addSchemaRef(schemaRef) {
|
|
77
|
-
return new Trail({
|
|
78
|
-
path: this.path.concat(schemaRef),
|
|
79
|
-
apiPath: this.apiPath,
|
|
80
|
-
method: this.method,
|
|
81
|
-
schemaRef,
|
|
82
|
-
document: this.document,
|
|
83
|
-
subMethodIndex: this.subMethodIndex
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
toSubMethodTrail() {
|
|
87
|
-
return new Trail({
|
|
88
|
-
path: this.path.slice(this.subMethodIndex),
|
|
89
|
-
apiPath: this.apiPath,
|
|
90
|
-
method: this.method,
|
|
91
|
-
schemaRef: this.schemaRef,
|
|
92
|
-
document: this.document,
|
|
93
|
-
subMethodIndex: 0
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
clone() {
|
|
97
|
-
return new Trail({
|
|
98
|
-
path: this.path,
|
|
99
|
-
apiPath: this.apiPath,
|
|
100
|
-
method: this.method,
|
|
101
|
-
schemaRef: this.schemaRef,
|
|
102
|
-
document: this.document,
|
|
103
|
-
subMethodIndex: this.subMethodIndex
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
toString() {
|
|
107
|
-
return this.path.reduce((acc, path) => {
|
|
108
|
-
if (!acc) {
|
|
109
|
-
return path;
|
|
110
|
-
}
|
|
111
|
-
return path.startsWith('[') ? `${acc}${path}` : `${acc}.${path}`;
|
|
112
|
-
}, '');
|
|
113
|
-
}
|
|
114
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toDocumentV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentV3.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,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAkBrB,CAAA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
type ConstructorArgs = {
|
|
3
|
-
path?: string[];
|
|
4
|
-
apiPath?: string;
|
|
5
|
-
method?: string;
|
|
6
|
-
schemaRef?: string;
|
|
7
|
-
document?: OpenAPIV3.Document;
|
|
8
|
-
subMethodIndex?: number;
|
|
9
|
-
};
|
|
10
|
-
export declare class Trail {
|
|
11
|
-
path: string[];
|
|
12
|
-
apiPath: string | undefined;
|
|
13
|
-
method: string | undefined;
|
|
14
|
-
schemaRef: string | undefined;
|
|
15
|
-
document: OpenAPIV3.Document | undefined;
|
|
16
|
-
subMethodIndex?: number;
|
|
17
|
-
constructor({ path, apiPath, method, schemaRef, document, subMethodIndex }?: ConstructorArgs);
|
|
18
|
-
add(path: string): Trail;
|
|
19
|
-
addApiPath(apiPath: string): Trail;
|
|
20
|
-
addMethod(method: string): Trail;
|
|
21
|
-
addSchemaRef(schemaRef: string): Trail;
|
|
22
|
-
toSubMethodTrail(): Trail;
|
|
23
|
-
clone(): Trail;
|
|
24
|
-
toString(): string;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=Trail.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trail.d.ts","sourceRoot":"","sources":["../../src/context/Trail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAA;IACxC,cAAc,CAAC,EAAE,MAAM,CAAA;gBAEX,EACV,IAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACf,GAAE,eAAoB;IASvB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAWxB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK;IAWlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK;IAWhC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK;IAWtC,gBAAgB,IAAI,KAAK;IAWzB,KAAK,IAAI,KAAK;IAWd,QAAQ,IAAI,MAAM;CASnB"}
|
package/script/context/Trail.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Trail = void 0;
|
|
4
|
-
class Trail {
|
|
5
|
-
constructor({ path = [], apiPath, method, schemaRef, document, subMethodIndex } = {}) {
|
|
6
|
-
Object.defineProperty(this, "path", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true,
|
|
10
|
-
value: void 0
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(this, "apiPath", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: void 0
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(this, "method", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: void 0
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(this, "schemaRef", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: void 0
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(this, "document", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true,
|
|
34
|
-
value: void 0
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(this, "subMethodIndex", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true,
|
|
39
|
-
writable: true,
|
|
40
|
-
value: void 0
|
|
41
|
-
});
|
|
42
|
-
this.path = Array.isArray(path) ? path : [path];
|
|
43
|
-
this.apiPath = apiPath;
|
|
44
|
-
this.method = method;
|
|
45
|
-
this.schemaRef = schemaRef;
|
|
46
|
-
this.document = document;
|
|
47
|
-
this.subMethodIndex = subMethodIndex;
|
|
48
|
-
}
|
|
49
|
-
add(path) {
|
|
50
|
-
return new Trail({
|
|
51
|
-
path: this.path.concat(path),
|
|
52
|
-
apiPath: this.apiPath,
|
|
53
|
-
method: this.method,
|
|
54
|
-
schemaRef: this.schemaRef,
|
|
55
|
-
document: this.document,
|
|
56
|
-
subMethodIndex: this.subMethodIndex
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
addApiPath(apiPath) {
|
|
60
|
-
return new Trail({
|
|
61
|
-
path: this.path.concat(`[${apiPath}]`),
|
|
62
|
-
apiPath,
|
|
63
|
-
method: this.method,
|
|
64
|
-
schemaRef: this.schemaRef,
|
|
65
|
-
document: this.document,
|
|
66
|
-
subMethodIndex: this.subMethodIndex
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
addMethod(method) {
|
|
70
|
-
return new Trail({
|
|
71
|
-
path: this.path.concat(method),
|
|
72
|
-
apiPath: this.apiPath,
|
|
73
|
-
method,
|
|
74
|
-
schemaRef: this.schemaRef,
|
|
75
|
-
document: this.document,
|
|
76
|
-
subMethodIndex: this.path.length + 1
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
addSchemaRef(schemaRef) {
|
|
80
|
-
return new Trail({
|
|
81
|
-
path: this.path.concat(schemaRef),
|
|
82
|
-
apiPath: this.apiPath,
|
|
83
|
-
method: this.method,
|
|
84
|
-
schemaRef,
|
|
85
|
-
document: this.document,
|
|
86
|
-
subMethodIndex: this.subMethodIndex
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
toSubMethodTrail() {
|
|
90
|
-
return new Trail({
|
|
91
|
-
path: this.path.slice(this.subMethodIndex),
|
|
92
|
-
apiPath: this.apiPath,
|
|
93
|
-
method: this.method,
|
|
94
|
-
schemaRef: this.schemaRef,
|
|
95
|
-
document: this.document,
|
|
96
|
-
subMethodIndex: 0
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
clone() {
|
|
100
|
-
return new Trail({
|
|
101
|
-
path: this.path,
|
|
102
|
-
apiPath: this.apiPath,
|
|
103
|
-
method: this.method,
|
|
104
|
-
schemaRef: this.schemaRef,
|
|
105
|
-
document: this.document,
|
|
106
|
-
subMethodIndex: this.subMethodIndex
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
toString() {
|
|
110
|
-
return this.path.reduce((acc, path) => {
|
|
111
|
-
if (!acc) {
|
|
112
|
-
return path;
|
|
113
|
-
}
|
|
114
|
-
return path.startsWith('[') ? `${acc}${path}` : `${acc}.${path}`;
|
|
115
|
-
}, '');
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
exports.Trail = Trail;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toDocumentV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentV3.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,WAAW,EAAE,MAAM,eAAe,CAAA;AAK3C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,YAAY,0BAGtB,gBAAgB,KAAG,WAkBrB,CAAA"}
|