Generate typescript code for openapi.
gen({
url: 'https://petstore.swagger.io/v2/swagger.json',
version: '2',
outputDir: `${__dirname}/gen`,
});| Param | Description |
|---|---|
| url | The url of fetch openapi or swagger data |
| path | The filePath of fetch openapi or swagger data |
| object | The docs of fetch openapi or swagger data |
| outputDir | Dir of output files |
| fetchModuleFile | Fetch impl file path |
| handlePostScript | post script to customize the result |
| handleGenPath | custom generated file path |