[MSF4J] Add generator for WSO2 Microservices Framework (MSF4J)#4056
[MSF4J] Add generator for WSO2 Microservices Framework (MSF4J)#4056wing328 merged 1 commit intoswagger-api:masterfrom
Conversation
|
This commit is to provide MSF4J(https://github.com/wso2/msf4j) support for swagger code generator. However ./bin/{LANG}-petstore.sh did not added as this is entirely new framework. Please let me know if anything need. I tried different swagger definitions including pet store and everything worked smoothly for me. Thank you all. |
|
@sanjeewa-malalgoda thank you for your contribution. I'll review and let you know if I've any question. |
|
Also following text need to add documents section and it explains how we can generate code and run micro service. Java Micro Services Framework For Java Before you build/run service replace .deploy(new PetApi()) with your actual service class name in Application.java file like .deploy(new ApisAPI()) then it will start that service. If you have multiple service classes add them in , separated manner. To Use-it : in the generated folder try mvn package for build jar. Run the following command or simply go to http://127.0.0.1:8080/pet/12 from your browser. |
|
|
||
| public JavaMSF4JServerCodegen() { | ||
| super(); | ||
| outputFolder = "generated-code/JavaJaxRS-Jersey"; |
There was a problem hiding this comment.
Should we set outputFolder to "generated-code/JavaMS4J" instead?
There was a problem hiding this comment.
Actually I found some other Java server stub generators do not have proper outputFolder set.
I'll file a PR to clean those up (including this one)
|
I've added the documentation to https://github.com/swagger-api/swagger-codegen/wiki/Server-stub-generator-HOWTO#java-msf4j Please also update https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/resources/MSF4J/README.mustache as the instruction does not seem correct for MSF4J. |
|
To all, please help retweet to promote the new generator. |
|
Thank you very much @wing328. It was great pleasure to work in this project and i hope to contribute further in future. |
|
@sanjeewa-malalgoda Looking forward to your contributions in the future. Btw, I've added you as the template owner of MSF4J in https://github.com/swagger-api/swagger-codegen/blob/master/README.md#template-creator |
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)