Skip to content

Conversation

@daniel-sc
Copy link
Contributor

fixes #20799 (was introduced with #20681)

@TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @topce @akehir @petejohansonxo @amakhrov @davidgamero @mkusaka @joscha please review :)

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 package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in Git BASH)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Copy link
Contributor

@joscha joscha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test fixture that shows the serialization before and after these changes (one that would have caught this regression in the first place)?

@daniel-sc
Copy link
Contributor Author

@joscha I don't really understand how/if this can be archived. The serialization happens in the (generated) TS code - all tests are Java tests. To really test this, we'd need to run TS tests on the generated code? Any other things I miss?

@macjohnny
Copy link
Member

@daniel-sc
there are typescript tests e.g. in https://github.com/OpenAPITools/openapi-generator/tree/master/samples/client/petstore/typescript-angular-v16-provided-in-root/tests/default/src

merging this fix now, the tests can be done separately

@macjohnny macjohnny merged commit 8ead4b6 into OpenAPITools:master Mar 12, 2025
16 checks passed
@daniel-sc
Copy link
Contributor Author

@macjohnny Ok - can you point me to the place where these tests are run during CI?

@macjohnny
Copy link
Member

@daniel-sc

(cd samples/client/petstore/typescript-angular-v12-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v13-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v14-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v15-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v16-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v17-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v18-provided-in-root && mvn integration-test)
(cd samples/client/petstore/typescript-angular-v19-provided-in-root && mvn integration-test)

@joscha
Copy link
Contributor

joscha commented Mar 12, 2025

merging this fix now, the tests can be done separately

agreed, thank you for the fix @daniel-sc

@daniel-sc
Copy link
Contributor Author

@macjohnny one more thing about the integration tests - doesn't

mean that any failing tests won't turn the build red? And if I read the build of this PR correctly at https://app.circleci.com/pipelines/github/OpenAPITools/openapi-generator/33718/workflows/9511b452-4a12-45d6-adff-cf896de5ff3a/jobs/111502 there are actually many errors/failures?

@macjohnny
Copy link
Member

@daniel-sc interesting finding, yes it seems some tests are actually failing. @wing328 i guess this should fail the CI, but currently it doesn't. can you take a look?

@wing328
Copy link
Member

wing328 commented Mar 13, 2025

Not sure why I added set +e a while ago (there was a set -e earlier in the script)

I filed #20870 and looks like the CircleCI node 3 is correctly reporting the errors.

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.

[BUG][TypeScript-Angular] Incorrect Query Parameter Serialization for Objects in OpenAPI Generator v7.12.0

4 participants