-
-
Save effervescentia/ddfb5fc750e9f16fbaaa200050f7466b to your computer and use it in GitHub Desktop.
openapi-generator typescript-fetch ideal configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generatorName: typescript-fetch | |
inputSpec: /code/openapi.json | |
### global customization ### | |
# sets the suffix for generated client class names | |
# | |
# before: class UserApi | |
# after: class UserClient | |
apiNameSuffix: Client | |
# avoid prefixing all the client methods with the controller name | |
# | |
# before: UserClient#userControllerFindByID() | |
# after: UserClient#findByID() | |
removeOperationIdPrefix: true | |
### generator customization ### | |
additionalProperties: | |
# use positional parameters based on the controller method | |
# instead of creating an object with autogenerated names for each parameter | |
# | |
# before: patchOneByID({ userID: 1, userControllerRequestBody: { name: 'foo' } }) | |
# after: patchOneByID(1, { name: 'foo' }) | |
useSingleRequestParameter: false | |
# ensure that the names of generated interfaces do not conflict with each other | |
# | |
# before: interface FindOneByID | |
# after: interface UserControllerFindOneByID | |
prefixParameterInterfaces: true | |
# ensure that enum property names are uppercase | |
# | |
# before: enum SomeEnum { Property = 'property' } | |
# after: enum SomeEnum { PROPERTY = 'property' } | |
enumPropertyNaming: UPPERCASE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment