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

Add new option allArgConstructor for java client, spring generators #18538

Merged
merged 9 commits into from
May 1, 2024

Conversation

wing328
Copy link
Member

@wing328 wing328 commented Apr 30, 2024

based on #18405

remove EOL in pojo template

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 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (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.1.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.

jpfinne and others added 8 commits April 16, 2024 22:23
…onstructor

# Conflicts:
#	modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
#	modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java
#	modules/openapi-generator/src/main/resources/scala-cask/build.sbt.mustache
#	modules/openapi-generator/src/main/resources/scala-cask/build.sc.mustache
#	modules/openapi-generator/src/main/resources/scala-cask/project/plugins.sbt
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/docs/PetApiDocumentation.md
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/docs/StoreApiDocumentation.md
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/docs/UserApiDocumentation.md
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/main/java/org/openapitools/client/api/PetApi.java
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/main/java/org/openapitools/client/api/StoreApi.java
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/main/java/org/openapitools/client/api/UserApi.java
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/test/java/org/openapitools/client/api/PetApiTest.java
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/test/java/org/openapitools/client/api/StoreApiTest.java
#	samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/test/java/org/openapitools/client/api/UserApiTest.java
#	samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml/src/main/java/org/openapitools/client/RFC3339DateFormat.java
#	samples/client/petstore/java/microprofile-rest-client-3.0-jackson/src/main/java/org/openapitools/client/RFC3339DateFormat.java
#	samples/documentation/html2/.openapi-generator/VERSION
#	samples/server/petstore/scala-cask/.openapi-generator/VERSION
#	samples/server/petstore/scala-cask/build.sbt
#	samples/server/petstore/scala-cask/build.sc
#	samples/server/petstore/scala-cask/project/plugins.sbt
@wing328 wing328 mentioned this pull request Apr 30, 2024
5 tasks
@wing328 wing328 changed the title Jpfinne feat add java all args constructor Add new option allArgConstructor for java May 1, 2024
@wing328 wing328 changed the title Add new option allArgConstructor for java Add new option allArgConstructor for java client, spring generators May 1, 2024
@wing328 wing328 merged commit 2a1b4f9 into master May 1, 2024
76 checks passed
@wing328 wing328 deleted the jpfinne-featAddJavaAllArgsConstructor branch May 1, 2024 10:10
@wing328 wing328 added this to the 7.6.0 milestone May 20, 2024
@@ -1899,38 +1900,6 @@ public void testMicroprofileGenerateCorrectJsonbCreator_issue12622() throws Exce
.containsWithNameAndAttributes("JsonbProperty", ImmutableMap.of("value", "\"c\""));
}

@Test
public void testMicroprofileGenerateCorrectJacksonGenerator_issue18336() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

@wing328 why this test was removed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for pointing it out. i missed that during review

@jpfinne can you please take a look?

Copy link
Contributor

Choose a reason for hiding this comment

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

This test did not exist in 7.5.0.

So most probably a merge issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

A manual merge from master to my branch, with a manual handling of the conflicts.

i.e. a mistake

Copy link
Member Author

Choose a reason for hiding this comment

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

that's ok. it happened before.

can you please file a PR to restore those changes (deleted as part of the merge from master)?

Copy link
Contributor

Choose a reason for hiding this comment

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

#19005

Fixing my wrong merge

Btw: I find it hard to justifiy the time spent on this project when the commit are not done in my name

Copy link
Member Author

Choose a reason for hiding this comment

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

Btw: I find it hard to justifiy the time spent on this project when the commit are not done in my name

what do you mean?

the commit correctly shows you as the co-author:

commit 2a1b4f90df4974a497fd0fe5a545c09007c12688
Author: William Cheng <wing328hk@gmail.com>
Date:   Wed May 1 18:10:35 2024 +0800

    Add new option `allArgConstructor` for java client, spring generators (#18538)

    * allArgConstructor for java

    * Remove leftover from builder pattern branch

    * Rename generateConstructorWithAllArgs and use x- in vendorExtensions

    * Test issue #18340

    * Add evidences for allVars issue (#18340)

    * remove eol

    * update doc

    ---------

    Co-authored-by: jpfinne <jeanpaul@finne.be>

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.

3 participants