openapi

package
v2.1.1812 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Openapi = generator.Generator{
	"openapi",
	"OpenAPI v3",
	"Generate OpenAPI specification",
	[]generator.GeneratorArg{
		{Arg: generator.ArgSpecFile, Required: true},
		{Arg: generator.ArgOutFile, Required: true},
	},
	func(specification *spec.Spec, params generator.GeneratorArgsValues) *generator.Sources {
		openapiFile := GenerateOpenapi(specification, params[generator.ArgOutFile])
		sources := generator.NewSources()
		sources.AddGenerated(openapiFile)
		return sources
	},
}

Functions

func GenerateOpenapi

func GenerateOpenapi(spec *spec.Spec, outFile string) *generator.CodeFile

func OpenApiType

func OpenApiType(types ...*spec.TypeDef) *yamlx.YamlMap

func PlainOpenApiType

func PlainOpenApiType(typeInfo *spec.TypeInfo, typ string) *yamlx.YamlMap

Types

type UrlOperations

type UrlOperations struct {
	Url        string
	Operations []*spec.NamedOperation
}

func OperationsByUrl

func OperationsByUrl(specification *spec.Spec) []*UrlOperations

Jump to

Keyboard shortcuts

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