@kubb/adapter-oas 5.0.0-beta.36 → 5.0.0-beta.38
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 +353 -201
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +353 -201
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/adapter.ts +73 -29
- package/src/constants.ts +8 -0
- package/src/dialect.ts +3 -3
- package/src/factory.ts +37 -8
- package/src/parser.ts +11 -16
- package/src/refs.ts +15 -1
- package/src/resolvers.ts +27 -10
- package/src/schemaDiagnostics.ts +76 -0
- package/src/stream.ts +5 -3
- package/src/types.ts +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -466,9 +466,9 @@ type AdapterOasOptions = {
|
|
|
466
466
|
serverVariables?: Record<string, string>;
|
|
467
467
|
/**
|
|
468
468
|
* How the `discriminator` field on `oneOf`/`anyOf` schemas is interpreted.
|
|
469
|
-
* - `'strict'`
|
|
469
|
+
* - `'strict'` child schemas stay exactly as written. The discriminator
|
|
470
470
|
* narrows types at the call site but child shapes are not modified.
|
|
471
|
-
* - `'inherit'`
|
|
471
|
+
* - `'inherit'` Kubb propagates the discriminator property as a literal
|
|
472
472
|
* value into each child schema, so each branch's discriminator field is
|
|
473
473
|
* precisely typed.
|
|
474
474
|
*
|
|
@@ -479,9 +479,9 @@ type AdapterOasOptions = {
|
|
|
479
479
|
* Collapse structurally identical schemas and enums into a single shared definition.
|
|
480
480
|
*
|
|
481
481
|
* Duplicated inline shapes (especially enums repeated across many properties) are hoisted
|
|
482
|
-
* into one named schema
|
|
483
|
-
* component
|
|
484
|
-
* `description` and `example` is ignored. Enabled by default
|
|
482
|
+
* into one named schema. Every other occurrence, and any structurally identical top-level
|
|
483
|
+
* component, becomes a `ref` to it. Equality is shape-only: documentation such as
|
|
484
|
+
* `description` and `example` is ignored. Enabled by default. Set to `false` to keep every
|
|
485
485
|
* occurrence inline and produce byte-for-byte identical output to earlier versions.
|
|
486
486
|
*
|
|
487
487
|
* @default true
|