openapi

package module
v0.0.0-...-3ca44e0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 5 Imported by: 1

README

Golang OpenAPI specification generator

Generate an openapi specification easily with golang codes.

Usage

openapi.Generate("My Example API", OpenAPIRoutes)
Example
go run example/simple.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(title string, routes []Route) error

Types

type OpenAPI

type OpenAPI interface {
	// contains filtered or unexported methods
}

func New

func New(title string) OpenAPI

type Route

type Route struct {
	Method          string
	Path            string
	Request         interface{}
	SuccessResponse interface{}
	ErrorResponse   interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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