package openapi3gen
import "github.com/getkin/kin-openapi/openapi3gen"
Package openapi3gen generates OpenAPI 3 schemas for Go types.
Index ¶
- Variables
- func NewSchemaRefForValue(value interface{}) (*openapi3.SchemaRef, map[*openapi3.SchemaRef]int, error)
- type CycleError
- type Generator
Variables ¶
var RefSchemaRef = openapi3.NewSchemaRef("Ref", openapi3.NewObjectSchema().WithProperty("$ref", openapi3.NewStringSchema().WithMinLength(1)))
Functions ¶
func NewSchemaRefForValue ¶
func NewSchemaRefForValue(value interface{}) (*openapi3.SchemaRef, map[*openapi3.SchemaRef]int, error)
Types ¶
type CycleError ¶
type CycleError struct{}
CycleError indicates that a type graph has one or more possible cycles.
func (*CycleError) Error ¶
func (err *CycleError) Error() string
type Generator ¶
type Generator struct { Types map[reflect.Type]*openapi3.SchemaRef // SchemaRefs contains all references and their counts. // If count is 1, it's not ne // An OpenAPI identifier has been assigned to each. SchemaRefs map[*openapi3.SchemaRef]int }
func NewGenerator ¶
func NewGenerator() *Generator
func (*Generator) GenerateSchemaRef ¶
Source Files ¶
- Version
- v0.24.0
- Published
- Oct 26, 2020
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- now –
Tools for package owners.