Skip to content

Commit 97970e6

Browse files
committed
docs: Fix option name openapiFile → openapiFiles
Changed all occurrences of the incorrect option name: - openapiFile (❌ singular) → openapiFiles (✅ plural) - Updated type to string | string[] to support multiple OpenAPI schemas - Fixed Quick Start examples (Vite, Webpack, Rsbuild) - Fixed Configuration Options section with correct type signature The actual option name in the codebase is openapiFiles (plural), as defined in: - packages/core/src/options.ts - packages/utils/src/read-openapi.ts (normalizeOpenapiFiles function)
1 parent 1a24d0b commit 97970e6

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ export default defineConfig({
121121
plugins: [
122122
devupApi({
123123
// Optional: customize configuration
124-
openapiFile: 'openapi.json', // default
125-
tempDir: 'df', // default
126-
convertCase: 'camel', // default
124+
openapiFiles: 'openapi.json', // default
125+
tempDir: 'df', // default
126+
convertCase: 'camel', // default
127127
}),
128128
],
129129
})
@@ -152,7 +152,7 @@ const { devupApiWebpackPlugin } = require('@devup-api/webpack-plugin')
152152
module.exports = {
153153
plugins: [
154154
new devupApiWebpackPlugin({
155-
openapiFile: 'openapi.json',
155+
openapiFiles: 'openapi.json',
156156
tempDir: 'df',
157157
}),
158158
],
@@ -170,7 +170,7 @@ import { devupApiRsbuildPlugin } from '@devup-api/rsbuild-plugin'
170170
export default defineConfig({
171171
plugins: [
172172
devupApiRsbuildPlugin({
173-
openapiFile: 'openapi.json',
173+
openapiFiles: 'openapi.json',
174174
tempDir: 'df',
175175
}),
176176
],
@@ -190,7 +190,7 @@ your-project/
190190
└── vite.config.ts (or next.config.ts, etc.)
191191
```
192192

193-
> **Tip:** You can specify a custom path using the `openapiFile` option in plugin configuration.
193+
> **Tip:** You can specify a custom path using the `openapiFiles` option in plugin configuration.
194194
195195
### **Step 4: Configure TypeScript**
196196

@@ -1470,10 +1470,11 @@ All plugins accept the following options:
14701470
```ts
14711471
interface DevupApiOptions {
14721472
/**
1473-
* OpenAPI file path
1473+
* OpenAPI file path(s)
1474+
* Can be a single file path or an array of file paths for multiple API schemas
14741475
* @default 'openapi.json'
14751476
*/
1476-
openapiFile?: string
1477+
openapiFiles?: string | string[]
14771478

14781479
/**
14791480
* Temporary directory for storing generated files
@@ -1488,13 +1489,13 @@ interface DevupApiOptions {
14881489
convertCase?: 'snake' | 'camel' | 'pascal' | 'maintain'
14891490

14901491
/**
1491-
* Whether to make all properties non-nullable by default
1492+
* Whether to make all request properties non-nullable by default
14921493
* @default false
14931494
*/
14941495
requestDefaultNonNullable?: boolean
14951496

14961497
/**
1497-
* Whether to make all request properties non-nullable by default
1498+
* Whether to make all response properties non-nullable by default
14981499
* @default true
14991500
*/
15001501
responseDefaultNonNullable?: boolean

0 commit comments

Comments
 (0)