-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix invalid spring properties prefix #3501
Fix invalid spring properties prefix #3501
Conversation
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
...-generator/src/main/resources/JavaSpring/libraries/spring-cloud/clientConfiguration.mustache
Outdated
Show resolved
Hide resolved
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.
please fix these lines, too:
Lines 27 to 31 in 7a16b03
{{=<% %>=}}@Value("${<%title%>.security.<%name%>.username:}")<%={{ }}=%> | |
private String {{{name}}}Username; | |
{{=<% %>=}}@Value("${<%title%>.security.<%name%>.password:}")<%={{ }}=%> | |
private String {{{name}}}Password; |
Lines 41 to 42 in 7a16b03
{{=<% %>=}}@Value("${<%title%>.security.<%name%>.key:}")<%={{ }}=%> | |
private String {{{name}}}Key; |
@macjohnny Will this work?
|
I guess it wont, because the maybe this should be converted to normal mustache tags, and escape the |
Ok got it. Yes it would be better to escape the It think a variable is a good solution:
Then i could use:
Do you have a proposal,where i should add the |
how about @Value("${{=<% %>=}}{<%={{ }}=%>{{#lambda.lowercase}}{{{title}}}{{/lambda.lowercase}}.security.{{name}}.key:{{=<% %>=}}}<%={{ }}=%>")
private String {{{name}}}Key; |
This will work, but is not really readable. |
ok, a variable is a good solution. you can add it e.g. 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.
LGTM
@sirwayne thanks for the PR, which has been included in the 4.1.0 release: https://twitter.com/oas_generator/status/1160000504455319553 |
fixes #3381
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{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\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
. Default:master
.--
Description of the PR
Fix invalid spring properties prefix