openapi

command module
v0.0.0-...-48b9d42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

Server

Go Swagger
https://github.com/go-swagger/go-swagger
Write swagger source
// swagger:meta

// swagger:route

// swagger:parameters

// swagger:model
Generate a spec from source
swagger generate spec -m -o spec/swagger.json \
    -c github.com/gunsluo/go-example/openapi/h \
    -c github.com/gunsluo/go-example/openapi/v

Client

Install Tools
brew install openapi-generator
Generate SDK
ory dev swagger sanitize ./spec/swagger.json

swagger validate ./spec/swagger.json

openapi-generator config-help -g go

ory dev openapi migrate \
    --health-path-tags metadata \
    spec/swagger.json spec/api.json

openapi-generator generate -i spec/api.json -g go -o client/api \
    --git-user-id gunsluo \
    --git-repo-id "go-example/openapi/client/api" \
    --git-host github.com \
    -t client/templates/go \
    -c client/go.yml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
client
api Module
example Module
h
Package handler Configurator
Package handler Configurator
v

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL