@kubb/adapter-oas 5.0.0-beta.99 → 5.0.1
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/README.md +10 -8
- package/dist/index.cjs +1222 -934
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +1214 -926
- package/dist/index.js.map +1 -1
- package/package.json +18 -6
package/README.md
CHANGED
|
@@ -45,29 +45,31 @@ import { defineConfig } from 'kubb'
|
|
|
45
45
|
import { adapterOas } from '@kubb/adapter-oas'
|
|
46
46
|
|
|
47
47
|
export default defineConfig({
|
|
48
|
-
input:
|
|
49
|
-
path: './openapi.yaml',
|
|
50
|
-
},
|
|
48
|
+
input: './openapi.yaml',
|
|
51
49
|
output: {
|
|
52
50
|
path: './src/gen',
|
|
53
51
|
},
|
|
54
|
-
|
|
52
|
+
adapter: adapterOas(),
|
|
55
53
|
})
|
|
56
54
|
```
|
|
57
55
|
|
|
56
|
+
`input` accepts a file path, a URL, an inline JSON or YAML string, or a parsed spec object.
|
|
57
|
+
|
|
58
58
|
## API
|
|
59
59
|
|
|
60
60
|
### `adapterOas(options?)`
|
|
61
61
|
|
|
62
|
-
Creates the OAS adapter instance. Pass it
|
|
62
|
+
Creates the OAS adapter instance. Pass it as `adapter` in `defineConfig`.
|
|
63
63
|
|
|
64
|
-
### `
|
|
64
|
+
### `adapterOasName`
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
The adapter's name, `'oas'`. Use it to identify this adapter in a Kubb config.
|
|
67
67
|
|
|
68
68
|
### Types
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
The package re-exports the OpenAPI types it works with: `ContentType`, `DiscriminatorObject`, `Document`,
|
|
71
|
+
`MediaTypeObject`, `Operation`, `ReferenceObject`, `ResponseObject`, and `SchemaObject`. Its own option types are
|
|
72
|
+
`AdapterOas`, `AdapterOasOptions`, and `AdapterOasResolvedOptions`.
|
|
71
73
|
|
|
72
74
|
## Supporting Kubb
|
|
73
75
|
|