|
|
|
|
|
by hardwaresofton
2057 days ago
|
|
Thanks for the detailed answers! You know what would make it really clear -- a "Quick Start" section, show me how to go from 0 to 1 with your library. From what I can gather: - `pip install` your library - create a golang project - write some routes (and annotate them accordingly) - call your library via `python ...` (?) - api.yaml is written to my directory Thanks for open sourcing this software! |
|
Yesterday I extended the README file so you can start using information from this section: https://github.com/egorsmkv/openapi3-generator#how-to-use
As I said before the project isn't related to business logic of your APIs but I can show you an example how you could use it. It's an example about how to create an API in Go.
After generating an api.yaml file go to api-spec-converter [1] and convert content of API spec in OpenAPI 3 format to Swagger 2.
Then download an executable file of go-swagger [2] and run this command to generate all boilerplate code for your server:
swagger generate server -f ./swagger.json -A pet-api
This way you can firstly prototype (describe all paths, schemes, and requests) of your API and only then to start to write code. It's hugely simplifying the process of coding in my opinion.
[1]: https://lucybot-inc.github.io/api-spec-converter/
[2]: https://github.com/go-swagger/go-swagger