OpenAPITools / OpenAPITools/openapi-generator
[BUG][erlang-server] same path handled by 2 modules
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The generator generates code where some methods are handled by a different module. This doesn't work with cowboy and you end up with confusing 405.
openapi-generator version
openapi-generator-cli 5.2.0-SNAPSHOT
commit : f48311d
OpenAPI declaration file content or url
https://raw.githubusercontent.com/jdegre/5GC_APIs/master/TS29509_Nausf_UEAuthentication.yaml
Generation Details
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i /local/TS29509_Nausf_UEAuthentication.yaml -o /local/out/erlang/29509 -g erlang-server
get_operations() ->
#{
'Delete5gAkaAuthenticationResult' => #{
path => "/nausf-auth/v1/ue-authentications/:authCtxId/5g-aka-confirmation",
method => <<"DELETE">>,
handler => 'openapi_authentication_result_deletion_handler'
},
......
'UeAuthenticationsAuthCtxId5gAkaConfirmationPut' => #{
path => "/nausf-auth/v1/ue-authentications/:authCtxId/5g-aka-confirmation",
method => <<"PUT">>,
handler => 'openapi_default_handler'
},
Steps to reproduce
Related issues/PRs
Suggest a fix
The generator should make sure one type of path can only point to one handler
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the erlang-server generation with TS29509_Nausf_UEAuthentication.yaml using the Docker command in the issue, then inspect the generated get_operations() entries for the conflicting path. Done means each path is associated with a handler arrangement that works with Cowboy and no longer produces the reported 405 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang, openapi
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100