schemas

package
v0.0.0-...-2c4b980 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 12 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 InferType

func InferType(s *base.Schema)

InferType fixes missing type if it is missing & can be inferred

func IsSimpleSchema

func IsSimpleSchema(s *base.Schema) bool

IsSimpleSchema returns true if the schema is a scalar type, false otherwise.

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