Bug Report Checklist
Description
When we have 2 operations (where operation = HTTP VERB + PATH) with the same path e.g.
GET path/{id}
PATCH path/{id}
and
- the GET response body schema is just a reference to a well defined schema (e.g.
GenericDTO)
- the PATCH request body is an inline schema
you''ll have, in the openAPI's components, these 2 schemas:
GenericDTO
ApiV1PathIdGetRequest
the second schema 's name is wrong, it should instead be ApiV1PathIdPatchRequest
Sorry for not providing a spec to reproduce, I fixed it working against my day job's swagger.
Will try, eventually if I find the time, to create a spec in my free time.
openapi-generator version
6.4.0-SNAPSHOT
OpenAPI declaration file content or url
JSON spec
Generation Details
On master run
./run-in-docker.sh mvn package
./run-in-docker.sh generate -i spec.json -g typescript-angular --global-property models
You'll get 2 interfaces:
apiV1CustomerIdGetRequest.ts
customerResponse.ts
the first file name is wrong, it should be called apiV1CustomerIdPatchRequest.ts since it's the inline schema for the patch 's requestBody
Steps to reproduce
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
When we have 2 operations (where operation = HTTP VERB + PATH) with the same path e.g.
and
GenericDTO)you''ll have, in the openAPI's components, these 2 schemas:
GenericDTOApiV1PathIdGetRequestthe second schema 's name is wrong, it should instead be
ApiV1PathIdPatchRequestSorry for not providing a spec to reproduce, I fixed it working against my day job's swagger.
Will try, eventually if I find the time, to create a spec in my free time.
openapi-generator version
6.4.0-SNAPSHOT
OpenAPI declaration file content or url
JSON spec
Generation Details
On master run
./run-in-docker.sh mvn package./run-in-docker.sh generate -i spec.json -g typescript-angular --global-property modelsYou'll get 2 interfaces:
the first file name is wrong, it should be called
apiV1CustomerIdPatchRequest.tssince it's the inline schema for the patch 's requestBodySteps to reproduce
Related issues/PRs
Suggest a fix