Skip to content

Commit d2f2dfa

Browse files
authored
Merge pull request #47 from StreakingMan/docs/readme
Docs/readme
2 parents 7eac10d + 26e316b commit d2f2dfa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ OpenAPI Specification ➡️ TypeScript
88
npm i -D oas-gen-ts
99
```
1010

11+
or
12+
13+
```shell
14+
yarn add --dev oas-gen-ts
15+
```
16+
1117
# Usage
1218

1319
## CLI
@@ -16,9 +22,10 @@ Create oas.config.js or oas.json in the root directory of the project, and refer
1622

1723
The search order for configuration files is `oas.config.cjs`, `oas.config.js`, `oas.json`.
1824

19-
```ts
25+
```javascript
2026
// oas.config.cjs
21-
export default defineConfig({
27+
const { defineConfig } = require('oas-gen-ts');
28+
module.exports = defineConfig({
2229
axiosImport: `import { axios } from '@/util/axios';`,
2330
list: [
2431
{

0 commit comments

Comments
 (0)