@kubb/adapter-oas 5.0.0-beta.22 → 5.0.0-beta.24
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 +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +35 -17
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/extension.yaml +144 -57
- package/package.json +2 -2
- package/src/adapter.ts +14 -6
- package/src/types.ts +21 -11
package/dist/index.cjs
CHANGED
|
@@ -2031,14 +2031,17 @@ function createInputStream({ schemas, parseSchema, parseOperation, baseOas, pars
|
|
|
2031
2031
|
//#endregion
|
|
2032
2032
|
//#region src/adapter.ts
|
|
2033
2033
|
/**
|
|
2034
|
-
*
|
|
2034
|
+
* Canonical adapter name for `@kubb/adapter-oas`. Used for driver lookups.
|
|
2035
2035
|
*/
|
|
2036
2036
|
const adapterOasName = "oas";
|
|
2037
2037
|
/**
|
|
2038
|
-
*
|
|
2038
|
+
* Default Kubb adapter for OpenAPI 2.0, 3.0, and 3.1 specifications. Reads the
|
|
2039
|
+
* file at `input.path`, validates it, resolves the base URL, and converts every
|
|
2040
|
+
* schema and operation into the universal AST that every downstream plugin
|
|
2041
|
+
* consumes.
|
|
2039
2042
|
*
|
|
2040
|
-
*
|
|
2041
|
-
*
|
|
2043
|
+
* Configure once on `defineConfig`. The adapter's choices (date representation,
|
|
2044
|
+
* integer width, server URL) apply to every plugin in the build.
|
|
2042
2045
|
*
|
|
2043
2046
|
* @example
|
|
2044
2047
|
* ```ts
|
|
@@ -2047,8 +2050,13 @@ const adapterOasName = "oas";
|
|
|
2047
2050
|
* import { pluginTs } from '@kubb/plugin-ts'
|
|
2048
2051
|
*
|
|
2049
2052
|
* export default defineConfig({
|
|
2050
|
-
*
|
|
2051
|
-
*
|
|
2053
|
+
* input: { path: './petStore.yaml' },
|
|
2054
|
+
* output: { path: './src/gen' },
|
|
2055
|
+
* adapter: adapterOas({
|
|
2056
|
+
* serverIndex: 0,
|
|
2057
|
+
* discriminator: 'inherit',
|
|
2058
|
+
* dateType: 'date',
|
|
2059
|
+
* }),
|
|
2052
2060
|
* plugins: [pluginTs()],
|
|
2053
2061
|
* })
|
|
2054
2062
|
* ```
|