oa3 generates HTTP endpoint stubs and supporting models from OpenAPI 3 specs.
- Golang >=1.18
git
go install github.com/aarondl/oa3@latest
./oa3 <your_favorite_generator>
go build
go test
./oa3 --help
Coming Soon™. Currently as there are no examples you can look at the testdata directories of your favorite language where generally you will find a test openapi yaml spec as well as the generated files for that yaml.
This is an exhaustive list of things that are supported as a paremeter by each generator.
Name | Values | Description |
---|---|---|
package | oa3gen (default) | Override the package name for the generated files |
timetype | time (default) | {type: string, format: date/datetime/time} uses time.Time |
chrono | {type: string, format: date/datetime/time} uses chrono.X |
|
decimaltype | string (default) | {type: string, format: decimal} changes nothing |
decimaltype | shopspring | {type: string, format: decimal} uses shopspring decimal |
uuidtype | string (default) | {type: string, format: uuid} uses string |
uuidtype | {type: string, format: uuid} uses google's uuid library |
Name | Values | Description |
---|---|---|
package | oa3gen (default) | Override the package name for the generated files |
timetype | time (default) | {type: string, format: date/datetime/time} uses time.Time |
chrono | {type: string, format: date/datetime/time} uses chrono.X |
|
decimaltype | string (default) | {type: string, format: decimal} changes nothing |
decimaltype | shopspring | {type: string, format: decimal} uses shopspring decimal |
uuidtype | string (default) | {type: string, format: uuid} uses string |
uuidtype | {type: string, format: uuid} uses google's uuid library |
Currently no parameters are supported.