-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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] use contextPath variable for RestApplication templates #825
Conversation
…k in order to make name clashing less probable. (#731)
* add option to generate all models * update doc * rename option to skipFormModel * update petstore samples * Update doc * Update samples
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. |
@wing328 I've added my work email to my account, so it should be ok now. |
… improvement (#831) Added "@Api" swagger annotation, "nickname" for ApiOperation. Fixed javadock for rest-assured client.
* Added server variable support * Replaced tabs with 4 spaces
@@ -3,7 +3,7 @@ package {{invokerPackage}}; | |||
import javax.ws.rs.ApplicationPath; | |||
import javax.ws.rs.core.Application; | |||
|
|||
@ApplicationPath("/") | |||
@ApplicationPath("{{contextPath}}") |
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.
@michbeck100 I would suggest using {{{contextPath}}}
instead to avoid special characters (e.g. @) being escaped.
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 don't think we need a new variable contentPath
as just some characters are escaped which make no sense in an url anyway (see here)
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 mean {{{contextPath}}}
. Sorry for the typo. (fixed above)
A user asked about how one would approach generating code from multiple specifications. Adding this information to the README, as it seems others would find the information helpful. Also explaining how to use tasks from this plugin as this may not be commonly known or intuitive beahvior.
It makes sense that error messages should be written to STDERR and all others should be written to STDOUT (as shown in #207). However, it would be convenient to parse the debugging output when the relevant flags are set. This change will disable logging to STDOUT and redirect all log messages to STDERR when any of the debug flags are set. (Resolves #473)
Adds new --log-to-stderr as well as a missed option for --skip-validate-spec.
* [PHP] Remove PHP related rules from root gitignore After conversation with @ackintosh we've agreed that every PHP codegen should create it's own `.gitignore`. Client libraries(SDKs) should ignore `composer.lock` file while server stubs better do opposite. * [PHP] Set .gitignore as default supporting file * [PHP] Add default gitignore to Client SDK * [PHP] Add default gitignore to Laravel * [PHP] Add default gitignore to Lumen * [PHP] Add default gitignore to Silex Seems like issue #663 and pull request #681 missed this security script, I've changed output path in bin/security/silex-petstore-server.sh. * [PHP] Update Slim * [PHP] Add default gitignore to Symfony I've copied few old rules from root gitignore to local one. These rules should be reviewed by original SymfonyCodegen authors. * [PHP] Add default gitignore to Zend * [PHP] Refresh Openapi3 client samples * [PHP] Add refs to .gitignore templates collection
Seems like this PR has been incorrectly rebased and therefore it contains commits from other authors. Do you mind submitting a new one by cherry-picking the commits you created? |
Sorry for that, #850 contains the changes now. |
NOTE: You could also have forced pushed your local branch containing the correct commits ( But closing this one and opening a new one is also possible. We will continue the review in #850. |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
The mustache templates for the JAXRS application define
/
in the@ApplicationPath
annotation. This PR replaces this with{{contextPath}}
, which contains the path of the server url. If no additional path is given and the server url contains no trailing/
the value is an empty string. This will be replaced again with/
by JAXRS.