-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Implement Server Stub Code for Vert.x Web #4286
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
Conversation
Signed-off-by: lwlee2608 <[email protected]>
|
||
# if you've executed sbt assembly previously it will use that instead. | ||
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" | ||
ags="generate -i $SPEC -g $GENERATOR --artifact-id java-vertx-web-rx-server -o $STUB_DIR --additional-properties hideGenerationTimestamp=true $@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion: adding -t
with the resource (template) folder so that we don't need to recompile the whole project if we're only changing the templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see, good idea.
@@ -0,0 +1,162 @@ | |||
/* | |||
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) | |||
* Copyright 2018 SmartBear Software |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lwlee2608 I don't think we need line 3 as per https://opensource.stackexchange.com/questions/7300/copyright-notice-in-the-file-header-apache-v2-license/7301#7301
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, done
|
||
To build the project using maven, run: | ||
```bash | ||
mvn package && java -jar target/target/java-vertx-web-rx-server-1.0.0-SNAPSHOT-fat.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use {{artifactVersion}} instead of hard-coded 1.0.0-SNAPSHOT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake, done
Tested locally and the result is good:
|
Please add a new entry for testing in https://github.com/OpenAPITools/openapi-generator/blob/master/pom.xml#L1166 If the output works with JDK7 as well, please also add an entry to https://github.com/OpenAPITools/openapi-generator/blob/master/pom.xml#L1205 |
...pi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java
Show resolved
Hide resolved
...pi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java
Outdated
Show resolved
Hide resolved
…fromOperation(). Also remove unused annotation import from model
@wing328 all comments have been addressed. Please review The server uses Java8 feature extensively, therefore does not work in JDK7 or lower. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's merge it into master and get some feedback from the community.
@lwlee2608 thanks for the new generator, which has been merged into master. For your upcoming PRs, I would recommend creating a new branch as per git best practice. |
@lwlee2608 thanks for the PR, which has been included in v4.2.0 release: https://twitter.com/oas_generator/status/1189824932345069569 |
PR checklist
./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc).master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
Add server generation
java-vertx-web
which use Vert.x-Webcc @wing328 @jimschubert @cbornet @ackintosh @jmini @etherealjoy
For #115