schema

package
v0.0.0-...-8eaeb25 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathFromOpenApiPath

func PathFromOpenApiPath(path string) string

func RequestSchemaFromOpenApi3RequestRef

func RequestSchemaFromOpenApi3RequestRef(
	ref *openapi3.RequestBody,
	mediaType string,
) any

func ResponseSchemaFromOpenApi3ResponseRef

func ResponseSchemaFromOpenApi3ResponseRef(
	ref *openapi3.ResponseRef,
	mediaType string,
) any

func SchemaFromAny

func SchemaFromAny(config any) any

Types

type Mapper

type Mapper interface {
	MapToRequestParameters(ctx echo.Context) RequestParameters
}

type MapperImpl

type MapperImpl struct{}

func NewMapper

func NewMapper() *MapperImpl

func (*MapperImpl) MapToRequestParameters

func (*MapperImpl) MapToRequestParameters(ctx echo.Context) RequestParameters

Map implements Mapper.

type ParameterProperties

type ParameterProperties map[string]*ParameterProperty

type ParameterProperty

type ParameterProperty struct {
	Required bool
	Type     reflect.Type
}

type RequestParameterProperty

type RequestParameterProperty struct {
	PathParameterProperties  ParameterProperties
	QueryParameterProperties ParameterProperties
}

type RequestParameters

type RequestParameters struct {
	PathParams  map[string]string
	QueryParams url.Values
}

type RequestSchema

type RequestSchema struct {
	// contains filtered or unexported fields
}

type Route

type Route struct {
	Path   string
	Method string
}

func (Route) Match

func (r Route) Match(path string) (map[string]string, bool)

Match returns true if the given path matches the route.

type RouteProperty

type RouteProperty struct {
	RequestParameterProperty
	RequestSchema  dstruct.DynamicStructModifier
	ResponseSchema dstruct.DynamicStructModifier
}

type SchemaInfo

type SchemaInfo struct {
	Kind   reflect.Kind
	Tags   string
	Format string
}

Jump to

Keyboard shortcuts

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