v3

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SchemaNames []string

SchemaNames schema names from components of OpenAPI3.0 json document also struct names from vo package

View Source
var Schemas = make(map[string]Schema)

Schemas from components of OpenAPI3.0 json document

Functions

func CastFunc

func CastFunc(t string) string

func CopySchema

func CopySchema(field astutils.FieldMeta) Schema

CopySchema as SchemaOf returns pointer, so deepcopy the schema the pointer points

func ElementType added in v1.0.5

func ElementType(t string) string

ElementType get element type string from slice

func IsBuiltin

func IsBuiltin(field astutils.FieldMeta) bool

IsBuiltin check whether field is built-in type https://pkg.go.dev/builtin or not

func IsEnum added in v1.0.5

func IsEnum(field astutils.FieldMeta) bool

IsEnum check whether field is enum

func IsOptional

func IsOptional(t string) bool

func IsSlice

func IsSlice(t string) bool

func IsStruct added in v1.1.9

func IsStruct(field astutils.FieldMeta) bool

IsStruct check whether field is struct type

func IsSupport

func IsSupport(t string) bool

func IsVarargs

func IsVarargs(t string) bool

func NewSchema

func NewSchema(structmeta astutils.StructMeta) Schema

NewSchema new schema from astutils.StructMeta

func RefAddDoc

func RefAddDoc(schema *Schema, doc string)

func SchemaOf

func SchemaOf(field astutils.FieldMeta) *Schema

SchemaOf reference https://golang.org/pkg/builtin/ type bool type byte type complex128 type complex64 type error type float32 type float64 type int type int16 type int32 type int64 type int8 type rune type string type uint type uint16 type uint32 type uint64 type uint8 type uintptr

func ToSlice

func ToSlice(t string) string

Types

This section is empty.

Directories

Path Synopsis
codegen

Jump to

Keyboard shortcuts

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