@scalar/openapi-parser 0.8.1 → 0.8.2
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/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/dist/lib/Validator/Validator.d.ts +1 -1
- package/dist/lib/Validator/Validator.d.ts.map +1 -1
- package/dist/types/index.d.ts +73 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/dereference.d.ts +3 -2
- package/dist/utils/dereference.d.ts.map +1 -1
- package/dist/utils/filter.d.ts +3 -2
- package/dist/utils/filter.d.ts.map +1 -1
- package/dist/utils/getEntrypoint.d.ts +2 -2
- package/dist/utils/getEntrypoint.d.ts.map +1 -1
- package/dist/utils/getEntrypoint.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/load/load.d.ts +13 -3
- package/dist/utils/load/load.d.ts.map +1 -1
- package/dist/utils/load/load.js +1 -1
- package/dist/utils/openapi/actions/details.d.ts +7 -0
- package/dist/utils/openapi/actions/details.d.ts.map +1 -0
- package/dist/utils/openapi/actions/details.js +1 -0
- package/dist/utils/openapi/actions/files.d.ts +6 -0
- package/dist/utils/openapi/actions/files.d.ts.map +1 -0
- package/dist/utils/openapi/actions/files.js +1 -0
- package/dist/utils/openapi/actions/get.d.ts +6 -0
- package/dist/utils/openapi/actions/get.d.ts.map +1 -0
- package/dist/utils/openapi/actions/get.js +1 -0
- package/dist/utils/openapi/actions/toJson.d.ts +6 -0
- package/dist/utils/openapi/actions/toJson.d.ts.map +1 -0
- package/dist/utils/openapi/actions/toJson.js +1 -0
- package/dist/utils/openapi/actions/toYaml.d.ts +6 -0
- package/dist/utils/openapi/actions/toYaml.d.ts.map +1 -0
- package/dist/utils/openapi/actions/toYaml.js +1 -0
- package/dist/utils/openapi/commands/dereferenceCommand.d.ts +27 -0
- package/dist/utils/openapi/commands/dereferenceCommand.d.ts.map +1 -0
- package/dist/utils/openapi/commands/dereferenceCommand.js +1 -0
- package/dist/utils/openapi/commands/filterCommand.d.ts +41 -0
- package/dist/utils/openapi/commands/filterCommand.d.ts.map +1 -0
- package/dist/utils/openapi/commands/filterCommand.js +1 -0
- package/dist/utils/openapi/commands/loadCommand.d.ts +8321 -0
- package/dist/utils/openapi/commands/loadCommand.d.ts.map +1 -0
- package/dist/utils/openapi/commands/loadCommand.js +1 -0
- package/dist/utils/openapi/commands/upgradeCommand.d.ts +3406 -0
- package/dist/utils/openapi/commands/upgradeCommand.d.ts.map +1 -0
- package/dist/utils/openapi/commands/upgradeCommand.js +1 -0
- package/dist/utils/openapi/commands/validateCommand.d.ts +3451 -0
- package/dist/utils/openapi/commands/validateCommand.d.ts.map +1 -0
- package/dist/utils/openapi/commands/validateCommand.js +1 -0
- package/dist/utils/openapi/index.d.ts +2 -0
- package/dist/utils/openapi/index.d.ts.map +1 -0
- package/dist/utils/openapi/openapi.d.ts +1270 -0
- package/dist/utils/openapi/openapi.d.ts.map +1 -0
- package/dist/utils/openapi/openapi.js +1 -0
- package/dist/utils/openapi/openapi.test-d.d.ts +2 -0
- package/dist/utils/openapi/openapi.test-d.d.ts.map +1 -0
- package/dist/utils/openapi/utils/queueTask.d.ts +6 -0
- package/dist/utils/openapi/utils/queueTask.d.ts.map +1 -0
- package/dist/utils/openapi/utils/queueTask.js +1 -0
- package/dist/utils/openapi/utils/workThroughQueue.d.ts +6 -0
- package/dist/utils/openapi/utils/workThroughQueue.d.ts.map +1 -0
- package/dist/utils/openapi/utils/workThroughQueue.js +1 -0
- package/dist/utils/upgrade.d.ts +1 -1
- package/dist/utils/upgrade.d.ts.map +1 -1
- package/dist/utils/upgrade.js +1 -1
- package/dist/utils/validate.d.ts +2 -1
- package/dist/utils/validate.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/utils/openapi.d.ts +0 -183
- package/dist/utils/openapi.d.ts.map +0 -1
- package/dist/utils/openapi.js +0 -1
- package/dist/utils/workThroughQueue.d.ts +0 -11
- package/dist/utils/workThroughQueue.d.ts.map +0 -1
- package/dist/utils/workThroughQueue.js +0 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ERRORS,OpenApiSpecifications,OpenApiVersions}from"./configuration/index.js";export{Validator,jsonSchemaVersions}from"./lib/Validator/Validator.js";export{resolveReferences}from"./utils/resolveReferences.js";export{dereference}from"./utils/dereference.js";export{details}from"./utils/details.js";export{escapeJsonPointer}from"./utils/escapeJsonPointer.js";export{filter}from"./utils/filter.js";export{getEntrypoint}from"./utils/getEntrypoint.js";export{getListOfReferences}from"./utils/getListOfReferences.js";export{getSegmentsFromPath}from"./utils/getSegmentsFromPath.js";export{isFilesystem}from"./utils/isFilesystem.js";export{isJson}from"./utils/isJson.js";export{isObject}from"./utils/isObject.js";export{isYaml}from"./utils/isYaml.js";export{load}from"./utils/load/load.js";export{normalize}from"./utils/normalize.js";export{openapi}from"./utils/openapi.js";export{toJson}from"./utils/toJson.js";export{toYaml}from"./utils/toYaml.js";export{transformErrors}from"./utils/transformErrors.js";export{traverse}from"./utils/traverse.js";export{unescapeJsonPointer}from"./utils/unescapeJsonPointer.js";export{upgrade}from"./utils/upgrade.js";export{upgradeFromThreeToThreeOne}from"./utils/upgradeFromThreeToThreeOne.js";export{upgradeFromTwoToThree}from"./utils/upgradeFromTwoToThree.js";export{validate}from"./utils/validate.js";
|
|
1
|
+
export{ERRORS,OpenApiSpecifications,OpenApiVersions}from"./configuration/index.js";export{Validator,jsonSchemaVersions}from"./lib/Validator/Validator.js";export{resolveReferences}from"./utils/resolveReferences.js";export{dereference}from"./utils/dereference.js";export{details}from"./utils/details.js";export{escapeJsonPointer}from"./utils/escapeJsonPointer.js";export{filter}from"./utils/filter.js";export{getEntrypoint}from"./utils/getEntrypoint.js";export{getListOfReferences}from"./utils/getListOfReferences.js";export{getSegmentsFromPath}from"./utils/getSegmentsFromPath.js";export{isFilesystem}from"./utils/isFilesystem.js";export{isJson}from"./utils/isJson.js";export{isObject}from"./utils/isObject.js";export{isYaml}from"./utils/isYaml.js";export{load}from"./utils/load/load.js";export{normalize}from"./utils/normalize.js";export{openapi}from"./utils/openapi/openapi.js";export{toJson}from"./utils/toJson.js";export{toYaml}from"./utils/toYaml.js";export{transformErrors}from"./utils/transformErrors.js";export{traverse}from"./utils/traverse.js";export{unescapeJsonPointer}from"./utils/unescapeJsonPointer.js";export{upgrade}from"./utils/upgrade.js";export{upgradeFromThreeToThreeOne}from"./utils/upgradeFromThreeToThreeOne.js";export{upgradeFromTwoToThree}from"./utils/upgradeFromTwoToThree.js";export{validate}from"./utils/validate.js";
|
|
@@ -10,7 +10,7 @@ export declare const jsonSchemaVersions: {
|
|
|
10
10
|
'https://json-schema.org/draft/2020-12/schema': typeof Ajv2020;
|
|
11
11
|
};
|
|
12
12
|
export declare class Validator {
|
|
13
|
-
version:
|
|
13
|
+
version: '2.0' | '3.0' | '3.1';
|
|
14
14
|
static supportedVersions: ("2.0" | "3.0" | "3.1")[];
|
|
15
15
|
protected ajvValidators: Record<string, ((specification: AnyObject) => boolean) & {
|
|
16
16
|
errors: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,aAAa,CAAA;AAKpB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,SAAS;IACb,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,aAAa,CAAA;AAKpB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,SAAS;IACb,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;IAErC,OAAc,iBAAiB,4BAAkB;IAGjD,SAAS,CAAC,aAAa,EAAE,MAAM,CAC7B,MAAM,EACN,CAAC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG;QACxC,MAAM,EAAE,MAAM,CAAA;KACf,CACF,CAAK;IAEN,SAAS,CAAC,MAAM,EAAE,MAAM,CAAA;IAExB,SAAS,CAAC,oBAAoB,EAAE,MAAM,CAAA;IAEtC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAE5B,aAAa,EAAE,SAAS,CAAA;IAE/B;;OAEG;IACG,QAAQ,CACZ,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,cAAc,CAAC;IAwF1B;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,cAAc;CA8B9C"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
import type { OpenAPI } from '@scalar/openapi-types';
|
|
2
2
|
import type { ERRORS, OpenApiVersion } from '../configuration/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Merge types with each other
|
|
5
|
+
*/
|
|
6
|
+
export type Merge<A, B> = A & Omit<B, keyof A>;
|
|
3
7
|
export type AnyObject = Record<string, any>;
|
|
8
|
+
/**
|
|
9
|
+
* JSON, YAML or object representation of an OpenAPI API definition
|
|
10
|
+
*/
|
|
11
|
+
export type AnyApiDefinitionFormat = string | AnyObject;
|
|
4
12
|
export type LoadResult = {
|
|
5
13
|
filesystem: Filesystem;
|
|
14
|
+
specification: AnyObject;
|
|
6
15
|
errors?: ErrorObject[];
|
|
7
16
|
};
|
|
8
17
|
export type ValidateResult = {
|
|
9
18
|
valid: boolean;
|
|
10
19
|
specification?: OpenAPI.Document;
|
|
11
|
-
version?:
|
|
20
|
+
version?: OpenApiVersion;
|
|
12
21
|
errors?: ErrorObject[];
|
|
13
22
|
schema?: OpenAPI.Document;
|
|
14
23
|
};
|
|
15
24
|
export type UpgradeResult<T extends OpenAPI.Document = OpenAPI.Document> = {
|
|
16
25
|
specification: T;
|
|
17
|
-
version:
|
|
26
|
+
version: '3.1';
|
|
18
27
|
};
|
|
19
28
|
export type FilterResult = {
|
|
20
|
-
specification:
|
|
29
|
+
specification: AnyObject;
|
|
21
30
|
};
|
|
22
31
|
export type DetailsResult = {
|
|
23
32
|
version: OpenApiVersion;
|
|
@@ -25,7 +34,7 @@ export type DetailsResult = {
|
|
|
25
34
|
specificationVersion: string;
|
|
26
35
|
};
|
|
27
36
|
export type DereferenceResult = {
|
|
28
|
-
version
|
|
37
|
+
version?: OpenApiVersion;
|
|
29
38
|
specification?: OpenAPI.Document;
|
|
30
39
|
schema?: OpenAPI.Document;
|
|
31
40
|
errors?: ErrorObject[];
|
|
@@ -52,6 +61,10 @@ export type FilesystemEntry = {
|
|
|
52
61
|
filename: string;
|
|
53
62
|
specification: AnyObject;
|
|
54
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Options, that can apply to all commands
|
|
66
|
+
*/
|
|
67
|
+
export type OpenApiOptions = ThrowOnErrorOption;
|
|
55
68
|
export type ThrowOnErrorOption = {
|
|
56
69
|
/**
|
|
57
70
|
* If `true`, the function will throw an error if the document is invalid.
|
|
@@ -60,4 +73,60 @@ export type ThrowOnErrorOption = {
|
|
|
60
73
|
*/
|
|
61
74
|
throwOnError?: boolean;
|
|
62
75
|
};
|
|
76
|
+
declare global {
|
|
77
|
+
/**
|
|
78
|
+
* Available commands, can be extended dynamically
|
|
79
|
+
*/
|
|
80
|
+
interface Commands {
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Input and a list of tasks to pipe the input through.
|
|
85
|
+
*/
|
|
86
|
+
export type Queue<T extends readonly Task[] = readonly Task[]> = {
|
|
87
|
+
/** The original input, can be a JSON or YAML string or an object */
|
|
88
|
+
input: AnyApiDefinitionFormat;
|
|
89
|
+
/** The current OpenAPI document, but as an object */
|
|
90
|
+
specification: AnyObject;
|
|
91
|
+
/** Global options */
|
|
92
|
+
options?: OpenApiOptions;
|
|
93
|
+
/** Queued tasks */
|
|
94
|
+
tasks: T;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Available tasks, populated from the global Commands interface
|
|
98
|
+
*/
|
|
99
|
+
export type Task = Commands[keyof Commands]['task'];
|
|
100
|
+
export type EmptyCommandChainResult = {
|
|
101
|
+
filesystem: Filesystem;
|
|
102
|
+
specification: AnyObject;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Command chain magic
|
|
106
|
+
*
|
|
107
|
+
* This type recursively builds a merged type based on the sequence of tasks.
|
|
108
|
+
*
|
|
109
|
+
* How it works:
|
|
110
|
+
* 1. It uses a conditional type with recursion to process the task array.
|
|
111
|
+
* 2. For each iteration:
|
|
112
|
+
* a. It extracts the first task (First) and the rest of the tasks (Rest).
|
|
113
|
+
* b. It checks if First is a valid Task and Rest is a Task array.
|
|
114
|
+
* c. If valid, it merges the Command type for the First task with the
|
|
115
|
+
* result of recursively processing the Rest of the tasks.
|
|
116
|
+
* 3. The recursion continues until the task array is empty.
|
|
117
|
+
* 4. When empty, it returns NonNullable<unknown> (equivalent to {}).
|
|
118
|
+
*
|
|
119
|
+
* Example:
|
|
120
|
+
* For tasks ['load', 'validate']:
|
|
121
|
+
* 1st iteration: Merge<Commands['load'], CommandChain<['validate']>>
|
|
122
|
+
* 2nd iteration: Merge<Commands['load'], Merge<Commands['validate'], NonNullable<unknown>>>
|
|
123
|
+
* Result: LoadResult & ValidateResult
|
|
124
|
+
*
|
|
125
|
+
* This type enables the API to correctly infer the return type based on
|
|
126
|
+
* the sequence of method calls in the fluent interface.
|
|
127
|
+
*/
|
|
128
|
+
export type CommandChain<T extends Task[]> = T extends [
|
|
129
|
+
infer First,
|
|
130
|
+
...infer Rest
|
|
131
|
+
] ? First extends Task ? Rest extends Task[] ? Merge<Commands[First['name']]['result'], CommandChain<Rest>> : never : never : EmptyCommandChainResult;
|
|
63
132
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAE9D,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAA;IAChC,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem, ThrowOnErrorOption } from '../types';
|
|
2
|
+
export type DereferenceOptions = ThrowOnErrorOption;
|
|
2
3
|
/**
|
|
3
4
|
* Validates an OpenAPI schema and resolves all references.
|
|
4
5
|
*/
|
|
5
|
-
export declare function dereference(value:
|
|
6
|
+
export declare function dereference(value: AnyApiDefinitionFormat | Filesystem, options?: DereferenceOptions): Promise<DereferenceResult>;
|
|
6
7
|
//# sourceMappingURL=dereference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../src/utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../src/utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EAEtB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EACnB,MAAM,UAAU,CAAA;AAMjB,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAA;AAEnD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,sBAAsB,GAAG,UAAU,EAC1C,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
|
package/dist/utils/filter.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { AnyObject, FilterResult } from '../types';
|
|
1
|
+
import type { AnyApiDefinitionFormat, AnyObject, FilterResult } from '../types';
|
|
2
|
+
export type FilterCallback = (schema: AnyObject) => boolean;
|
|
2
3
|
/**
|
|
3
4
|
* Filter the specification based on the callback
|
|
4
5
|
*/
|
|
5
|
-
export declare function filter(specification:
|
|
6
|
+
export declare function filter(specification: AnyApiDefinitionFormat, callback: FilterCallback): FilterResult;
|
|
6
7
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/utils/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/utils/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAK/E,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAA;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CACpB,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,cAAc,GACvB,YAAY,CAWd"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Filesystem } from '../types';
|
|
1
|
+
import type { Filesystem, FilesystemEntry } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Return just the entrypoint of the filesystem.
|
|
4
4
|
*/
|
|
5
|
-
export declare function getEntrypoint(filesystem
|
|
5
|
+
export declare function getEntrypoint(filesystem?: Filesystem): FilesystemEntry | undefined;
|
|
6
6
|
//# sourceMappingURL=getEntrypoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEntrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/getEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"getEntrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/getEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3D;;GAEG;AACH,wBAAgB,aAAa,CAC3B,UAAU,CAAC,EAAE,UAAU,GACtB,eAAe,GAAG,SAAS,CAE7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function n(n){return n
|
|
1
|
+
function n(n){return n?.find((n=>n.isEntrypoint))}export{n as getEntrypoint};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export * from './isYaml.js';
|
|
|
12
12
|
export * from './load';
|
|
13
13
|
export * from './load/load.js';
|
|
14
14
|
export * from './normalize.js';
|
|
15
|
-
export * from './openapi
|
|
15
|
+
export * from './openapi';
|
|
16
16
|
export * from './resolveReferences.js';
|
|
17
17
|
export * from './toJson.js';
|
|
18
18
|
export * from './toYaml.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Filesystem, LoadResult, ThrowOnErrorOption } from '../../types';
|
|
1
|
+
import type { AnyApiDefinitionFormat, Filesystem, LoadResult, ThrowOnErrorOption } from '../../types';
|
|
2
2
|
export type LoadPlugin = {
|
|
3
3
|
check: (value?: any) => boolean;
|
|
4
4
|
get: (value: any) => any;
|
|
@@ -6,9 +6,19 @@ export type LoadPlugin = {
|
|
|
6
6
|
getDir?: (value: any) => string;
|
|
7
7
|
getFilename?: (value: any) => string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type LoadOptions = {
|
|
10
10
|
plugins?: LoadPlugin[];
|
|
11
11
|
filename?: string;
|
|
12
12
|
filesystem?: Filesystem;
|
|
13
|
-
} & ThrowOnErrorOption
|
|
13
|
+
} & ThrowOnErrorOption;
|
|
14
|
+
/**
|
|
15
|
+
* Loads an OpenAPI document, including any external references.
|
|
16
|
+
*
|
|
17
|
+
* This function handles loading content from various sources, normalizes the content,
|
|
18
|
+
* and recursively loads any external references found within the definition.
|
|
19
|
+
*
|
|
20
|
+
* It builds a filesystem representation of all loaded content and collects any errors
|
|
21
|
+
* encountered during the process.
|
|
22
|
+
*/
|
|
23
|
+
export declare function load(value: AnyApiDefinitionFormat, options?: LoadOptions): Promise<LoadResult>;
|
|
14
24
|
//# sourceMappingURL=load.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/utils/load/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/utils/load/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EAGtB,UAAU,EACV,UAAU,EACV,kBAAkB,EACnB,MAAM,aAAa,CAAA;AAMpB,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,OAAO,CAAA;IAC/B,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;IACxB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACvD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAA;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB,GAAG,kBAAkB,CAAA;AAEtB;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CACxB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,UAAU,CAAC,CAqIrB"}
|
package/dist/utils/load/load.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ERRORS as e}from"../../configuration/index.js";import{getEntrypoint as
|
|
1
|
+
import{ERRORS as e}from"../../configuration/index.js";import{getEntrypoint as i}from"../getEntrypoint.js";import{getListOfReferences as r}from"../getListOfReferences.js";import{makeFilesystem as s}from"../makeFilesystem.js";import{normalize as t}from"../normalize.js";async function n(o,f){const c=[];if(f?.filesystem?.find((e=>e.filename===o)))return{specification:i(f.filesystem)?.specification,filesystem:f.filesystem,errors:c};const l=f?.plugins?.find((e=>e.check(o)));let a;if(l)try{a=t(await l.get(o))}catch(i){if(f?.throwOnError)throw new Error(e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o));return c.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:e.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",o)}),{specification:null,filesystem:[],errors:c}}else a=t(o);if(void 0===a){if(f?.throwOnError)throw new Error("No content to load");return c.push({code:"NO_CONTENT",message:e.NO_CONTENT}),{specification:null,filesystem:[],errors:c}}let m=s(a,{filename:f?.filename??null});const E=(f?.filename?m.find((e=>e.filename===f?.filename)):i(m)).references??r(a);if(0===E.length)return{specification:i(m)?.specification,filesystem:m,errors:c};for(const e of E){const i=f?.plugins?.find((i=>i.check(e)));if(!i)continue;const r=i.check(e)&&i.resolvePath?i.resolvePath(o,e):e;if(m.find((i=>i.filename===e)))continue;const{filesystem:s,errors:t}=await n(r,{...f,filename:e});c.push(...t),m=[...m,...s.map((e=>({...e,isEntrypoint:!1})))]}return{specification:i(m)?.specification,filesystem:m,errors:c}}export{n as load};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Queue, Task } from '../../../types';
|
|
2
|
+
import { details as detailsUtility } from '../../details.js';
|
|
3
|
+
/**
|
|
4
|
+
* Run the chained tasks and return just some basic information about the OpenAPI document
|
|
5
|
+
*/
|
|
6
|
+
export declare function details<T extends Task[]>(queue: Queue<T>): Promise<ReturnType<typeof detailsUtility>>;
|
|
7
|
+
//# sourceMappingURL=details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AAIzD;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAC5C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAI5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{details as t}from"../../details.js";import{getEntrypoint as i}from"../../getEntrypoint.js";import{workThroughQueue as o}from"../utils/workThroughQueue.js";async function r(r){const{filesystem:s}=await o(r);return t(i(s).specification)}export{r as details};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAG7D;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAC1C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,UAAU,CAAC,CAIrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{workThroughQueue as t}from"../utils/workThroughQueue.js";async function o(o){const{filesystem:r}=await t(o);return r}export{o as files};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAG/D;;GAEG;AACH,wBAAsB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,EACxC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAK1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{workThroughQueue as r}from"../utils/workThroughQueue.js";async function t(t){return{filesystem:[],...await r(t)}}export{t as get};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKjD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAC3C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getEntrypoint as o}from"../../getEntrypoint.js";import{toJson as t}from"../../toJson.js";import{workThroughQueue as r}from"../utils/workThroughQueue.js";async function s(s){const{filesystem:i}=await r(s);return t(o(i).specification)}export{s as toJson};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKjD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAC3C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,MAAM,CAAC,CAIjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getEntrypoint as t}from"../../getEntrypoint.js";import{toYaml as o}from"../../toYaml.js";import{workThroughQueue as r}from"../utils/workThroughQueue.js";async function i(i){const{filesystem:s}=await r(i);return o(t(s).specification)}export{i as toYaml};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DereferenceResult, Queue, Task } from '../../../types';
|
|
2
|
+
import type { DereferenceOptions } from '../../dereference.js';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Commands {
|
|
5
|
+
dereference: {
|
|
6
|
+
task: {
|
|
7
|
+
name: 'dereference';
|
|
8
|
+
options?: DereferenceOptions;
|
|
9
|
+
};
|
|
10
|
+
result: DereferenceResult;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Dereference the given OpenAPI document
|
|
16
|
+
*/
|
|
17
|
+
export declare function dereferenceCommand<T extends Task[]>(previousQueue: Queue<T>, options?: DereferenceOptions): {
|
|
18
|
+
details: () => Promise<import("../../../types").DetailsResult>;
|
|
19
|
+
files: () => Promise<import("../../../types").Filesystem>;
|
|
20
|
+
get: () => Promise<import("../../../types").CommandChain<[...T, {
|
|
21
|
+
name: "dereference";
|
|
22
|
+
options?: DereferenceOptions;
|
|
23
|
+
}]>>;
|
|
24
|
+
toJson: () => Promise<string>;
|
|
25
|
+
toYaml: () => Promise<string>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=dereferenceCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereferenceCommand.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/commands/dereferenceCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAQ3D,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,QAAQ;QAChB,WAAW,EAAE;YACX,IAAI,EAAE;gBACJ,IAAI,EAAE,aAAa,CAAA;gBACnB,OAAO,CAAC,EAAE,kBAAkB,CAAA;aAC7B,CAAA;YACD,MAAM,EAAE,iBAAiB,CAAA;SAC1B,CAAA;KACF;CACF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,IAAI,EAAE,EACjD,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,EAAE,kBAAkB;;;;cAbhB,aAAa;kBACT,kBAAkB;;;;EA+BnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{details as o}from"../actions/details.js";import{files as t}from"../actions/files.js";import{get as r}from"../actions/get.js";import{toJson as s}from"../actions/toJson.js";import{toYaml as i}from"../actions/toYaml.js";import{queueTask as n}from"../utils/queueTask.js";function e(e,m){const a={name:"dereference",options:{throwOnError:e.options?.throwOnError,...m??{}}},f=n(e,a);return{details:()=>o(f),files:()=>t(f),get:()=>r(f),toJson:()=>s(f),toYaml:()=>i(f)}}export{e as dereferenceCommand};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FilterResult, Queue, Task } from '../../../types';
|
|
2
|
+
import type { DereferenceOptions } from '../../dereference.js';
|
|
3
|
+
import type { FilterCallback } from '../../filter.js';
|
|
4
|
+
declare global {
|
|
5
|
+
interface Commands {
|
|
6
|
+
filter: {
|
|
7
|
+
task: {
|
|
8
|
+
name: 'filter';
|
|
9
|
+
options?: FilterCallback;
|
|
10
|
+
};
|
|
11
|
+
result: FilterResult;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Filter the given OpenAPI document
|
|
17
|
+
*/
|
|
18
|
+
export declare function filterCommand<T extends Task[]>(previousQueue: Queue<T>, options?: FilterCallback): {
|
|
19
|
+
dereference: (dereferenceOptions?: DereferenceOptions) => {
|
|
20
|
+
details: () => Promise<import("../../../types").DetailsResult>;
|
|
21
|
+
files: () => Promise<import("../../../types").Filesystem>;
|
|
22
|
+
get: () => Promise<import("../../../types").CommandChain<[...T, {
|
|
23
|
+
name: "filter";
|
|
24
|
+
options?: FilterCallback;
|
|
25
|
+
}, {
|
|
26
|
+
name: "dereference";
|
|
27
|
+
options?: DereferenceOptions;
|
|
28
|
+
}]>>;
|
|
29
|
+
toJson: () => Promise<string>;
|
|
30
|
+
toYaml: () => Promise<string>;
|
|
31
|
+
};
|
|
32
|
+
details: () => Promise<import("../../../types").DetailsResult>;
|
|
33
|
+
files: () => Promise<import("../../../types").Filesystem>;
|
|
34
|
+
get: () => Promise<import("../../../types").CommandChain<[...T, {
|
|
35
|
+
name: "filter";
|
|
36
|
+
options?: FilterCallback;
|
|
37
|
+
}]>>;
|
|
38
|
+
toJson: () => Promise<string>;
|
|
39
|
+
toYaml: () => Promise<string>;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=filterCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterCommand.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/commands/filterCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AASlD,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,QAAQ;QAChB,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ,CAAA;gBACd,OAAO,CAAC,EAAE,cAAc,CAAA;aACzB,CAAA;YACD,MAAM,EAAE,YAAY,CAAA;SACrB,CAAA;KACF;CACF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,IAAI,EAAE,EAC5C,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,EAAE,cAAc;uCAUa,kBAAkB;;;;kBAvB3C,QAAQ;sBACJ,cAAc;;;;;;;;;;;cADlB,QAAQ;kBACJ,cAAc;;;;EA8B/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{details as o}from"../actions/details.js";import{files as t}from"../actions/files.js";import{get as e}from"../actions/get.js";import{toJson as r}from"../actions/toJson.js";import{toYaml as s}from"../actions/toYaml.js";import{queueTask as i}from"../utils/queueTask.js";import{dereferenceCommand as m}from"./dereferenceCommand.js";function n(n,f){const a=i(n,{name:"filter",options:f});return{dereference:o=>m(a,o),details:()=>o(a),files:()=>t(a),get:()=>e(a),toJson:()=>r(a),toYaml:()=>s(a)}}export{n as filterCommand};
|