A code generator for OpenAPI v3.x BETA.
The tool is depracted. I am recommending using GRPC + PLEX.
Stride is a command line tool for rapid application development with OpenAPI v3 specification.
There are a lot of tools around the OpenAPI initiative. However neither of them gives comprehensive solution for rapid application development. The goal is to provide a tool that you can use to generate production ready server applications.
Doesn't matter whether you are starting from just concept, prototype or building your v1 product. The tool provides functionality for editing and viewing of OpenAPI specification. It generates a production ready scaffold projects. Also it can start a mock server. So you can quickly start building your front-end app without waiting for your actual back-end.
Thanks to the contributors of the following projects that empower stride
:
It provides the following subcommands:
NAME:
stride - OpenAPI viewer, editor, generator, validator and mocker
USAGE:
stride [global options]
COMMANDS:
edit Edit an OpenAPI specification in the browser
view Shows an OpenAPI specification in the browser
mock Runs a mock server from an OpenAPI specification
generate Generates a project from an OpenAPI specification
validate Validates an OpenAPI specification
help, h Shows a list of commands or help for one command
OPTIONS:
--version, -v prints the version
--help, -h shows help
Right now stride
supports only golang
. There are a few limitations that the
generator does not support for now. The following features are not supported:
- Inheritance and Polymorphism
- OneOf, AnyOf, AllOf and Not (there are some limitations due to the language constraints)
- Links
- Callbacks
- Authentication
Note that the code generated by the golang
generator compiles and run out of
the box. However, the package
restify that will support the
generated code is still in development phase.
- Golang generator (in testing phase)
- Enable a mock server for given OpenAPI specification
- Download the OpenAPI specification from different sources (local, s3, git and etc.)
- Support for Dictionaries, Hash Maps and Associative Arrays in Golang
- Support for
application/xml
andapplication/x-www-form-urlencoded
- Improve the OpenAPI validation reports
- Allow implementation of 3rd party generators in other languages (via GRPC)
There are a few ways to install it:
$ go get -u github.com/phogolabs/stride
$ go install github.com/phogolabs/stride/cmd/stride
$ brew tap phogolabs/tap
$ brew install stride
We are open for any contributions. Just fork the project.