Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soartec-lab/openapi-generator-axios
Development platform using `typescript-axios` of` openapi-generator`
https://github.com/soartec-lab/openapi-generator-axios
Last synced: about 1 month ago
JSON representation
Development platform using `typescript-axios` of` openapi-generator`
- Host: GitHub
- URL: https://github.com/soartec-lab/openapi-generator-axios
- Owner: soartec-lab
- License: mit
- Created: 2021-08-07T00:31:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-07T03:34:09.000Z (over 3 years ago)
- Last Synced: 2024-10-22T02:14:53.805Z (2 months ago)
- Language: TypeScript
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openapi-generator-axios
Many options need to be specified as arguments when developing using `typescript-axios` of` openapi-generator`.
This repository helps smooth development by organizing those items.## Usage
### Bash including option specification
```bash
$ ./bin/openapi-generator
```We have prepared a Bash that is complicated and contains many options. This command does the following:
1. Combine the split YAML files into one schema.
OAS files are often split to improve maintainability. But in the end it needs to be merged into one file. In this Bash, OAS managed in a distributed manner is integrated into one file and output to the `generated` directory.
2. Automatically generate TypeScript source code from OAS.
TypeScript code automatically generated from OAS is output under the `src` directory.
### Description of the generated code
The rules of the generated code are as follows:
* enumNameSuffix=''
```typescript
// enumNameSuffix='Enum'
export enum UserRoleEnum {
admin = 'admin',
general = 'general'
}// enumNameSuffix=''
export enum UserRole {
admin = 'admin',
general = 'general'
}
```* enumPropertyNaming=camelCase
```typescript
export enum UserRole {
subAdmin = 'subAdmin',
}
```* nullSafeAdditionalProps=true
Specify undefined for nullable properties.
```typescript
export interface User {
firstName: string | undefined;
}
```* supportsES6=true
support ES6
* withSeparateModelsAndApi=true
Separate the API connection part and schema model files.