-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[MSF4J] Add generator for WSO2 Microservices Framework (MSF4J) #4056
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set outputFolder
to "generated-code/JavaMS4J" instead?
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.
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)
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.
FYI. #4076 submitted
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. |
Tweet: https://twitter.com/wing328/status/791132415762784256 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.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)2.3.0
branch 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)