-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[jaxrs-spec] Add builders to models #4916
[jaxrs-spec] Add builders to models #4916
Conversation
JFYI: bitrise build is wrong - it tries to do something for
|
The bitwise failure can be ignored as we just added the Swift 5 generator to the master. |
modules/openapi-generator/src/main/resources/JavaJaxRS/spec/pojo.mustache
Show resolved
Hide resolved
|
||
@PUT | ||
@Path("/body-with-query-params") | ||
@Consumes({ "application/json" }) | ||
@ApiOperation(value = "", notes = "", tags={ "fake", }) | ||
@ApiResponses(value = { | ||
@ApiResponse(code = 200, message = "Success", response = Void.class) }) | ||
Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid User user); | ||
Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid User body); |
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 noticed that the body parameter name changes from user
to body
. Likely you're not using the latest (or recent) master when creating this PR.
Please merge the latest master of the official repo into your branch and regenerate the sample again.
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 have used 4.3.x
as the origin of my branch, are you sure I should merge master
in?
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. Please put it on hold. I'll take another look over the weekend or next week.
@@ -51,6 +52,7 @@ | |||
private boolean interfaceOnly = false; | |||
private boolean returnResponse = false; | |||
private boolean generatePom = true; | |||
private boolean generateBuilders = 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.
If this setting defaults to false, you can then target this change to the current master as it's no longer a breaking change. Otherwise, you will need to wait for 4.3.0 to be released on Feb 29.
d4582ef
to
ccb071f
Compare
To name the branch accordingly and restart the failing builds I'll close this PR and open a new one, with the correct target branch. |
As per #2415, adding builders generation for models.
The reasons for this change are:
set
prefix, which makes models not comply with java beans requirementsCompare the current way to construct a model to the proposed one:
now:
proposed:
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.3.x
,5.0.x
. Default:master
.