@kubb/adapter-oas 5.18.6 → 5.18.7
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +5 -12
- package/dist/index.js.map +1 -1
- package/docs/options.md +68 -24
- package/docs/overview.md +3 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1318,5 +1318,4 @@ type Operation = {
|
|
|
1318
1318
|
schema: OperationObject$1;
|
|
1319
1319
|
pathItem: PathItemObject$1;
|
|
1320
1320
|
};
|
|
1321
|
-
export type { AdapterOas, AdapterOasOptions, AdapterOasResolvedOptions, ContentType, DiscriminatorObject$1 as DiscriminatorObject, Document, MediaTypeObject$1 as MediaTypeObject, Operation, ReferenceObject$1 as ReferenceObject, ResponseObject$1 as ResponseObject, SchemaObject$1 as SchemaObject };
|
|
1322
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1321
|
+
export type { AdapterOas, AdapterOasOptions, AdapterOasResolvedOptions, ContentType, DiscriminatorObject$1 as DiscriminatorObject, Document, MediaTypeObject$1 as MediaTypeObject, Operation, ReferenceObject$1 as ReferenceObject, ResponseObject$1 as ResponseObject, SchemaObject$1 as SchemaObject };
|
package/dist/index.d.ts
CHANGED
|
@@ -1318,5 +1318,4 @@ type Operation = {
|
|
|
1318
1318
|
schema: OperationObject$1;
|
|
1319
1319
|
pathItem: PathItemObject$1;
|
|
1320
1320
|
};
|
|
1321
|
-
export type { AdapterOas, AdapterOasOptions, AdapterOasResolvedOptions, ContentType, DiscriminatorObject$1 as DiscriminatorObject, Document, MediaTypeObject$1 as MediaTypeObject, Operation, ReferenceObject$1 as ReferenceObject, ResponseObject$1 as ResponseObject, SchemaObject$1 as SchemaObject };
|
|
1322
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1321
|
+
export type { AdapterOas, AdapterOasOptions, AdapterOasResolvedOptions, ContentType, DiscriminatorObject$1 as DiscriminatorObject, Document, MediaTypeObject$1 as MediaTypeObject, Operation, ReferenceObject$1 as ReferenceObject, ResponseObject$1 as ResponseObject, SchemaObject$1 as SchemaObject };
|
package/dist/index.js
CHANGED
|
@@ -7,20 +7,14 @@ import { upgrade } from "@scalar/openapi-upgrader";
|
|
|
7
7
|
import { bundle } from "api-ref-bundler";
|
|
8
8
|
import { CORE_SCHEMA, load } from "js-yaml";
|
|
9
9
|
import * as yaml from "yaml";
|
|
10
|
-
import { parse } from "yaml";
|
|
11
|
-
// \0rolldown/runtime.js
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __name = (target, value) => __defProp(target, "name", {
|
|
14
|
-
value,
|
|
15
|
-
configurable: true
|
|
16
|
-
});
|
|
10
|
+
import { parse as parse$1 } from "yaml";
|
|
17
11
|
// kubb-extension.json
|
|
18
12
|
var compatibility = {
|
|
19
13
|
"kubb": ">=5.8.3",
|
|
20
14
|
"node": ">=22.22"
|
|
21
15
|
};
|
|
22
16
|
// package.json
|
|
23
|
-
var version = "5.18.
|
|
17
|
+
var version = "5.18.7";
|
|
24
18
|
// src/constants.ts
|
|
25
19
|
/**
|
|
26
20
|
* Default parser options applied when no explicit options are provided.
|
|
@@ -743,7 +737,7 @@ function parseYaml(data, { origin, help, json = true }) {
|
|
|
743
737
|
if (document !== void 0) return document;
|
|
744
738
|
} catch {}
|
|
745
739
|
try {
|
|
746
|
-
return parse(data);
|
|
740
|
+
return parse$1(data);
|
|
747
741
|
} catch (error) {
|
|
748
742
|
throw new Diagnostics.Error({
|
|
749
743
|
code: Diagnostics.code.invalidDocument,
|
|
@@ -3735,7 +3729,7 @@ function indexJson(source) {
|
|
|
3735
3729
|
};
|
|
3736
3730
|
}
|
|
3737
3731
|
/** Indexes plain JSON text; anything else goes to the YAML parser. */
|
|
3738
|
-
function parse
|
|
3732
|
+
function parse(source) {
|
|
3739
3733
|
if (/^[ \t\n\r]*\{/.test(source)) try {
|
|
3740
3734
|
return {
|
|
3741
3735
|
source,
|
|
@@ -3747,7 +3741,6 @@ function parse$1(source) {
|
|
|
3747
3741
|
document: yaml.parseDocument(source)
|
|
3748
3742
|
};
|
|
3749
3743
|
}
|
|
3750
|
-
__name(parse$1, "parse");
|
|
3751
3744
|
/**
|
|
3752
3745
|
* Maps OpenAPI JSON pointers and unresolved references to ranges in YAML or JSON source.
|
|
3753
3746
|
*/
|
|
@@ -3756,7 +3749,7 @@ const locate = (source, location) => {
|
|
|
3756
3749
|
cached = cached?.source === source ? {
|
|
3757
3750
|
...cached,
|
|
3758
3751
|
source
|
|
3759
|
-
} : parse
|
|
3752
|
+
} : parse(source);
|
|
3760
3753
|
const ref = "ref" in location ? location.ref : void 0;
|
|
3761
3754
|
if ("json" in cached) {
|
|
3762
3755
|
const { pointers, refs } = cached.json;
|