You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "zhfeng (via GitHub)" <gi...@apache.org> on 2024/05/22 04:10:59 UTC
[PR] Add contract first development section in rest-openapi doc [camel-quarkus]
zhfeng opened a new pull request, #6115:
URL: https://github.com/apache/camel-quarkus/pull/6115
<!-- Uncomment and fill this section if your PR is not trivial
[ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
[ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
[ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
[ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
[ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add contract first development section in rest-openapi doc [camel-quarkus]
Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng merged PR #6115:
URL: https://github.com/apache/camel-quarkus/pull/6115
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add contract first development section in rest-openapi doc [camel-quarkus]
Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on code in PR #6115:
URL: https://github.com/apache/camel-quarkus/pull/6115#discussion_r1609410873
##########
extensions/rest-openapi/runtime/src/main/doc/usage.adoc:
##########
@@ -24,4 +24,55 @@ When using the `classpath` resource locator with native code, the path to the Op
[source]
----
quarkus.native.resources.includes=openapi.json
-----
\ No newline at end of file
+----
+
+=== Contract First Development
+The model classes generation has been integrated with `quarkus-maven-plugin`. So it's no need to use `swagger-codegen-maven-plugin`, instead to put your contract files in the `src/main/openapi` with `.json` suffix. And add `generate-code` goal in `quarkus-maven-plugin` like:
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add contract first development section in rest-openapi doc [camel-quarkus]
Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on code in PR #6115:
URL: https://github.com/apache/camel-quarkus/pull/6115#discussion_r1609411148
##########
extensions/rest-openapi/runtime/src/main/doc/usage.adoc:
##########
@@ -24,4 +24,55 @@ When using the `classpath` resource locator with native code, the path to the Op
[source]
----
quarkus.native.resources.includes=openapi.json
-----
\ No newline at end of file
+----
+
+=== Contract First Development
+The model classes generation has been integrated with `quarkus-maven-plugin`. So it's no need to use `swagger-codegen-maven-plugin`, instead to put your contract files in the `src/main/openapi` with `.json` suffix. And add `generate-code` goal in `quarkus-maven-plugin` like:
+
+[source,xml]
+----
+<plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-code</goal>
+ </goals>
+ </execution>
+ </executions>
+</plugin>
+----
+
+It requires to specific the package name of the model classes by using `quarkus.camel.openapi.codegen.model-package` property of the `application.properties` file. For example:
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add contract first development section in rest-openapi doc [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #6115:
URL: https://github.com/apache/camel-quarkus/pull/6115#discussion_r1609364243
##########
extensions/rest-openapi/runtime/src/main/doc/usage.adoc:
##########
@@ -24,4 +24,55 @@ When using the `classpath` resource locator with native code, the path to the Op
[source]
----
quarkus.native.resources.includes=openapi.json
-----
\ No newline at end of file
+----
+
+=== Contract First Development
+The model classes generation has been integrated with `quarkus-maven-plugin`. So it's no need to use `swagger-codegen-maven-plugin`, instead to put your contract files in the `src/main/openapi` with `.json` suffix. And add `generate-code` goal in `quarkus-maven-plugin` like:
Review Comment:
```suggestion
The model classes generation has been integrated with the `quarkus-maven-plugin`. So there's no need to use the `swagger-codegen-maven-plugin`, instead put your contract files in `src/main/openapi` with a `.json` suffix. And add the `generate-code` goal to the `quarkus-maven-plugin` like:
```
##########
extensions/rest-openapi/runtime/src/main/doc/usage.adoc:
##########
@@ -24,4 +24,55 @@ When using the `classpath` resource locator with native code, the path to the Op
[source]
----
quarkus.native.resources.includes=openapi.json
-----
\ No newline at end of file
+----
+
+=== Contract First Development
+The model classes generation has been integrated with `quarkus-maven-plugin`. So it's no need to use `swagger-codegen-maven-plugin`, instead to put your contract files in the `src/main/openapi` with `.json` suffix. And add `generate-code` goal in `quarkus-maven-plugin` like:
+
+[source,xml]
+----
+<plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-code</goal>
+ </goals>
+ </execution>
+ </executions>
+</plugin>
+----
+
+It requires to specific the package name of the model classes by using `quarkus.camel.openapi.codegen.model-package` property of the `application.properties` file. For example:
Review Comment:
```suggestion
It requires a specific package name for the model classes by using the `quarkus.camel.openapi.codegen.model-package` property of the `application.properties` file. For example:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org