-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Slim] Improve codebase decouple #438
[Slim] Improve codebase decouple #438
Conversation
6dd7aa6
to
81b5bc3
Compare
public void setInvokerPackage(String invokerPackage) { | ||
super.setInvokerPackage(invokerPackage); | ||
apiPackage = invokerPackage + "\\" + apiDirName; | ||
modelPackage = invokerPackage + "\\" + modelDirName; |
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.
+ apiPackage = invokerPackage + "\\" + apiDirName;
+ modelPackage = invokerPackage + "\\" + modelDirName;
As the method name setInvokerPackage()
implies, it should set only invokerPackage
. 💡
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.
@ackintosh
I've copied it from PhpSymfony generator.
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java#L481-L490
Where I should place these changes then?
This enhancement required for modular testing and code coverage generating.
81b5bc3
to
b7addcd
Compare
Fixed. |
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.
Thanks for the fix. Looks good to me.
Upgrade noteCurrent refactoring brings breaking changes. If your application stop working you need to copypaste endpoints implementation from |
The Shippable failure has been addressed in the master. |
* master: (116 commits) 3.1.0 release (OpenAPITools#486) Fix broken link to openapi generator plugin README (OpenAPITools#484) show warning message for nodejs server only (OpenAPITools#481) Add grokify to Go technical committee (OpenAPITools#479) [Slim] Improve codebase decouple (OpenAPITools#438) Ensure typescript samples are up to date (OpenAPITools#444) Update README.md [Golang][client] delete sample output dir before rebuild (OpenAPITools#477) update petstore samples (OpenAPITools#478) Revert "Improve Docker Tags (OpenAPITools#390)" update go client test dependencies (OpenAPITools#468) [Golang][client] fix for schema definition name `file` (OpenAPITools#433) Fix '.travis' file (syntax) make LICENSE GitHub display compatible (OpenAPITools#467) Improve Docker Tags (OpenAPITools#390) [Golang][client] fix file suffix for _test.go (OpenAPITools#449) Remove copy section (OpenAPITools#463) Add link to presentation (OpenAPITools#465) Use postProcessOperationsWithModels(Map, List) (OpenAPITools#431) [C] Adding petstore sample written in C (OpenAPITools#306) ...
* [Slim] Decouple Api files into separated PHP Classes This enhancement required for modular testing and code coverage generating. * [Slim] Define all app routes in SlimRouter PHP Class. Generate new samples
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
Logical prepare before unit test generation feature.
Now generated package splitted into ApiControllers, Models and SlimRouter. This provides simple approach for unit testing and code coverage.
Samples omitted in first commit to simplify code review.
cc @jebentier @dkarlovi @mandrean @jfastnacht @ackintosh