Categorygithub.com/aarondl/oa3
modulepackage
0.0.57
Repository: https://github.com/aarondl/oa3.git
Documentation: pkg.go.dev

# README

oa3

oa3 generates HTTP endpoint stubs and supporting models from OpenAPI 3 specs.

Requirements

  • Golang >=1.18
  • git

Getting Started using oa3

  1. go install github.com/aarondl/oa3@latest
  2. ./oa3 <your_favorite_generator>

Getting Started developing on oa3

  1. go build
  2. go test
  3. ./oa3 --help

Examples

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.

Parameters

This is an exhaustive list of things that are supported as a paremeter by each generator.

Go Server

NameValuesDescription
packageoa3gen (default)Override the package name for the generated files
timetypetime (default){type: string, format: date/datetime/time} uses time.Time
chrono{type: string, format: date/datetime/time} uses chrono.X
decimaltypestring (default){type: string, format: decimal} changes nothing
decimaltypeshopspring{type: string, format: decimal} uses shopspring decimal
uuidtypestring (default){type: string, format: uuid} uses string
uuidtypegoogle{type: string, format: uuid} uses google's uuid library

Go Client

NameValuesDescription
packageoa3gen (default)Override the package name for the generated files
timetypetime (default){type: string, format: date/datetime/time} uses time.Time
chrono{type: string, format: date/datetime/time} uses chrono.X
decimaltypestring (default){type: string, format: decimal} changes nothing
decimaltypeshopspring{type: string, format: decimal} uses shopspring decimal
uuidtypestring (default){type: string, format: uuid} uses string
uuidtypegoogle{type: string, format: uuid} uses google's uuid library

Typescript Client

Currently no parameters are supported.

# Packages

No description provided by the author
Package generator makes a small abstraction for main => generators to work with.
No description provided by the author
No description provided by the author
No description provided by the author
Package support is full of helper functions and types for the code generator.
No description provided by the author
Package typescript generates typescript clients for the browser.