-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[Lumen] fixed Output-Formats [*/*] injection in Lumen routes/web.php #343
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
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. |
// escape quotation to avoid code injection, "*/*" is a special case, do nothing | ||
String encodedKey = "*/*".equals(key)? key : escapeText(escapeQuotationMark(key)); | ||
// escape quotation to avoid code injection, "*/*" is a special case, do nothing except adding blank | ||
String encodedKey = "*/*".equals(key)? "* / *" : escapeText(escapeQuotationMark(key)); |
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.
@Lv-Yi thanks for the fix but I'm afraid we need to keep it as previously reported by other users "/" should not be escaped/changed in order for it to function properly in the auto-generated code.
I think we'll need to create additional vendor extensions (e.g. x-consumes-doc) in postProcessOperations to handle "/" specifically in the PHP documentation.
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.
@Lv-Yi suggestion: what about doing it in the postProcessOperations of PHP Lumen generator (java class) instead so that other generators won't be impacted by the fix? Here is an example:
…-9.x chore(deps): update dependency dotenv to v9
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.1.x
,4.0.x
. Default:master
.Description of the PR
fixed Output-Formats [ * / * ] injection in Lumen routes/web.php as discussed in #212 .
removed MaxPermSize option in php-lumen-petstore-server.sh and security/lumen-petstore-server.sh which was obsolete in java8.
updated petstore server examples.