schemas

package
v0.102.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(doc libopenapi.Document, path, packageName string) error

Generate go models from OpenAPI spec schemas into a go file.

func IsSimpleSchema

func IsSimpleSchema(s *base.Schema) bool

IsSimpleSchema returns whether this schema is a scalar or array as these can't be circular references. Objects result in `false` and that triggers circular ref checks.

func RenderSchema

func RenderSchema(schemaName string, s *base.SchemaProxy) ([]byte, error)

RenderSchema returns generated go code from an OpenAPI Schema proxy object.

func RenderSimpleType

func RenderSimpleType(s *base.Schema) string

RenderSimpleType returns the type of a simple go type, not an object, map, array...etc. This function is called if you are sure IsSimpleSchema(s *base.Schema) return true. Add more simple type here.

Types

This section is empty.

Jump to

Keyboard shortcuts

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