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

Apache Camel Server Generator #11162

Merged
merged 26 commits into from
Jan 12, 2022
Merged

Conversation

carnevalegiacomo
Copy link
Contributor

@carnevalegiacomo carnevalegiacomo commented Dec 21, 2021

Generate models and Apache Camel Rest Definitions (Java DSL).

Features (Api first):

  • Bean Validation
  • Perform Bean Validation
  • Binding mode

Generation:

  • Maven Spring Boot Project
  • Mock
  • Unit Test

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/utils/export_docs_generators.sh
    
    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*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@carnevalegiacomo carnevalegiacomo marked this pull request as ready for review December 21, 2021 11:54
@carnevalegiacomo carnevalegiacomo marked this pull request as draft December 21, 2021 11:54
@carnevalegiacomo carnevalegiacomo marked this pull request as ready for review December 21, 2021 14:59
@carnevalegiacomo carnevalegiacomo marked this pull request as draft December 21, 2021 14:59
@carnevalegiacomo carnevalegiacomo marked this pull request as ready for review December 21, 2021 19:26
@wing328
Copy link
Member

wing328 commented Jan 3, 2022

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328 wing328 added this to the 5.4.0 milestone Jan 3, 2022
@wing328
Copy link
Member

wing328 commented Jan 3, 2022

@carnevalegiacomo I'll later rename the generator to java-camel (in a a separate PR) to follow the convention {lang}-{framework-name} that we've been using. Let me know if you've any concern with that.

@carnevalegiacomo
Copy link
Contributor Author

Hi
I renamed the generator to java-camel

Giacomo

@wing328
Copy link
Member

wing328 commented Jan 4, 2022

Tested locally and the result is good:

[INFO] --- spring-boot-maven-plugin:2.6.2:repackage (default) @ openapi-camel ---
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-buildpack-platform/2.6.2/spring-boot-buildpack-platform-2.6.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-buildpack-platform/2.6.2/spring-boot-buildpack-platform-2.6.2.pom (3.4 kB at 10 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-loader-tools/2.6.2/spring-boot-loader-tools-2.6.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-loader-tools/2.6.2/spring-boot-loader-tools-2.6.2.pom (2.3 kB at 7.0 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-buildpack-platform/2.6.2/spring-boot-buildpack-platform-2.6.2.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-loader-tools/2.6.2/spring-boot-loader-tools-2.6.2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-buildpack-platform/2.6.2/spring-boot-buildpack-platform-2.6.2.jar (242 kB at 642 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-loader-tools/2.6.2/spring-boot-loader-tools-2.6.2.jar (249 kB at 627 kB/s)
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:35 min
[INFO] Finished at: 2022-01-04T15:37:13+08:00
[INFO] ------------------------------------------------------------------------

@@ -25,6 +25,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{^parent}}{{#ha
{{/jackson}}
{{#gson}}
@SerializedName("{{baseName}}")
@SerializedName("{{baseName}}")
Copy link
Member

Choose a reason for hiding this comment

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

@carnevalegiacomo is this line added by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

can you please remove it when you've time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wing328
Copy link
Member

wing328 commented Jan 12, 2022

LGTM. Thanks for the new generator.

I'll file another PR later with some minor enhancements.

@wing328 wing328 merged commit 2e6e821 into OpenAPITools:master Jan 12, 2022
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.

None yet

2 participants