We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The model mustache template takes into account enums, the api template does not and incorrectly sets the datatype to the enum values.
openapi-generator-cli-4.0.0-20181126.024631-44
swagger: "2.0" info: title: "Simple Test" paths: "/get/Simple": get: summary: Retrieve List of Simple operationId: "get.Simple" parameters: - in: query name: animal type: string enum: - Cat - Dog - Tiger responses: 200: description: OK
Generated code (excerpt):
export interface GetSimpleRequest { animal?: 'Cat' | 'Dog' | 'Tiger'; }
openapi-generator generate -i openapi.yaml -l typescript-fetch -c es6.json -o ./typescript-api/
PR #569
Update the api mustache template to follow the same enum logic as the model template.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The model mustache template takes into account enums, the api template does not and incorrectly sets the datatype to the enum values.
openapi-generator version
openapi-generator-cli-4.0.0-20181126.024631-44
OpenAPI declaration file content or url
Generated code (excerpt):
Command line used for generation
openapi-generator generate -i openapi.yaml -l typescript-fetch -c es6.json -o ./typescript-api/
Steps to reproduce
Related issues/PRs
PR #569
Suggest a fix/enhancement
Update the api mustache template to follow the same enum logic as the model template.
The text was updated successfully, but these errors were encountered: