openapi-codegen

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

openapi-codegen

Implementation of OpenAPI code generation in Go.

Supports OpenAPI 3.0.3.

Features

  • Type-safe structs generation based on kin-openapi package
  • HTTP Client generation based on resty package

Usage

go install github.com/mayocream/openapi-codegen@latest

Usage of openapi-codegen:
  -t, --client-tpl string   Path to client template file, e.g. client.tmpl
  -o, --output string       Output path for generated Go file (default ".")
  -p, --package string      Go package name (default "api")
  -i, --spec string         Path to OpenAPI spec file (default "openapi.yaml")

openapi-codegen -i openapi.yaml -o . -p api -t client.tmpl

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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