Created by: sharkwouter
Before this change, the user would be required to make changes in the generated code. This makes it really hard to update the API and the documentation at the same time. With this change, the generated code can be imported as is and used. The user just needs to set the handler functions for each endpoint.
Endpoints which haven't had a handler function set will give a 501 (not yet implemented) error.
Testing this can be done with the following commands:
./mvnw clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go-gin-server \
-o /tmp/gin
I'm still working on the documentation for it and making sure that the style is correct. This is why it is still a draft. I wanted to submit it anyway, because I will use this work regardless of if there is interest in this community for it, but I wanted to check if there was any. Let me know if this is something that is wanted or not.
PR checklist
-
Read the contribution guidelines. -
Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community. -
Run the following to build the project and update samples: ./mvnw clean package ./bin/generate-samples.sh ./bin/utils/export_docs_generators.sh
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH. -
File the PR against the correct branch: master
(5.3.0),6.0.x
-
If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.