Skip to content
New issue

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

fix (DefaultGenerator): Handle "$ref" parameter reference to identify parameter ID (#20239) #20240

Merged

Conversation

JPPortier
Copy link
Contributor

Fix proposal for #20239

Use ref field when filled in place of missing name:in to avoid collision onto generated id (when $ref is present, it generate systemically null:null ID)

So, with fix, in place of generating a missing parameter onto function prototype:

  public void get(Integer queryParameter) throws ApiException {

It now generated the correct list:

  public void get(String pathParameter, Integer queryParameter) throws ApiException {

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean install
    
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@wing328
Copy link
Member

wing328 commented Dec 4, 2024

thanks for the PR

cc @OpenAPITools/generator-core-team

@wing328
Copy link
Member

wing328 commented Dec 5, 2024

tested locally to confirm the fix.

let's give it a try

i'll try to add a test later

@wing328 wing328 merged commit b250777 into OpenAPITools:master Dec 5, 2024
15 checks passed
@wing328 wing328 added this to the 7.11.0 milestone Dec 5, 2024
@wing328 wing328 mentioned this pull request Dec 5, 2024
5 tasks
@wing328
Copy link
Member

wing328 commented Dec 5, 2024

update: merged #20256 to add a test covering the issue moving forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants