doc

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	DocumentStruct(_package ...string) ([]spec.Schema, error)
}

Generator generated the OpenAPI document for the named packages

func NewOpenapiGenerator

func NewOpenapiGenerator(filter *regexp.Regexp, structTag string) Generator

NewOpenapiGenerator returns a new Generator

type SpecRegistry

type SpecRegistry map[string]spec.Schema

SpecRegistry holds spec.Schema registered by a given key

func (SpecRegistry) AddSchema

func (s SpecRegistry) AddSchema(key string, schema spec.Schema)

AddSchema register a spec.Schema registered by a given key

func (SpecRegistry) AddSchemaProp

func (s SpecRegistry) AddSchemaProp(props spec.SchemaProps)

AddSchemaProp is a convenience methods to call AddSchema for a spec.SchemaProps for which a spec.Schema is created and key is derived from SchemaProps ID

func (SpecRegistry) Extend

func (s SpecRegistry) Extend(r SpecRegistry)

func (SpecRegistry) Values

func (s SpecRegistry) Values() (specs []spec.Schema)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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