api

package
v0.0.0-...-cdf09a4 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

View Source
const (
	WriterCtxKey  = "writer"
	RequestCtxKey = "request"
)

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) NullableStrings

func (c *Client) NullableStrings(ctx context.Context, request NilString) error

NullableStrings invokes nullableStrings operation.

Nullable strings.

POST /nullableStrings

func (*Client) ObjectsWithConflictingArrayProperty

func (c *Client) ObjectsWithConflictingArrayProperty(ctx context.Context, request *ObjectsWithConflictingArrayPropertyReq) error

ObjectsWithConflictingArrayProperty invokes objectsWithConflictingArrayProperty operation.

Objects with conflicting array property.

POST /objectsWithConflictingArrayProperty

func (*Client) ObjectsWithConflictingProperties

func (c *Client) ObjectsWithConflictingProperties(ctx context.Context, request *ObjectsWithConflictingPropertiesReq) error

ObjectsWithConflictingProperties invokes objectsWithConflictingProperties operation.

Objects with conflicting properties.

POST /objectsWithConflictingProperties

func (*Client) ReferencedAllof

func (c *Client) ReferencedAllof(ctx context.Context, request ReferencedAllofReq) error

ReferencedAllof invokes referencedAllof operation.

Referenced allOf.

POST /referencedAllof

func (*Client) ReferencedAllofOptional

func (c *Client) ReferencedAllofOptional(ctx context.Context, request ReferencedAllofOptionalReq) error

ReferencedAllofOptional invokes referencedAllofOptional operation.

Referenced allOf, but requestBody is not required.

POST /referencedAllofOptional

func (*Client) SimpleInteger

func (c *Client) SimpleInteger(ctx context.Context, request int) error

SimpleInteger invokes simpleInteger operation.

Simple integers with validation.

POST /simpleInteger

func (*Client) SimpleObjects

func (c *Client) SimpleObjects(ctx context.Context, request *SimpleObjectsReq) error

SimpleObjects invokes simpleObjects operation.

Simple objects.

POST /simpleObjects

func (*Client) StringsNotype

func (c *Client) StringsNotype(ctx context.Context, request NilString) error

StringsNotype invokes stringsNotype operation.

POST /stringsNotype

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type Handler

type Handler interface {
	// NullableStrings implements nullableStrings operation.
	//
	// Nullable strings.
	//
	// POST /nullableStrings
	NullableStrings(ctx context.Context, req NilString) error
	// ObjectsWithConflictingArrayProperty implements objectsWithConflictingArrayProperty operation.
	//
	// Objects with conflicting array property.
	//
	// POST /objectsWithConflictingArrayProperty
	ObjectsWithConflictingArrayProperty(ctx context.Context, req *ObjectsWithConflictingArrayPropertyReq) error
	// ObjectsWithConflictingProperties implements objectsWithConflictingProperties operation.
	//
	// Objects with conflicting properties.
	//
	// POST /objectsWithConflictingProperties
	ObjectsWithConflictingProperties(ctx context.Context, req *ObjectsWithConflictingPropertiesReq) error
	// ReferencedAllof implements referencedAllof operation.
	//
	// Referenced allOf.
	//
	// POST /referencedAllof
	ReferencedAllof(ctx context.Context, req ReferencedAllofReq) error
	// ReferencedAllofOptional implements referencedAllofOptional operation.
	//
	// Referenced allOf, but requestBody is not required.
	//
	// POST /referencedAllofOptional
	ReferencedAllofOptional(ctx context.Context, req ReferencedAllofOptionalReq) error
	// SimpleInteger implements simpleInteger operation.
	//
	// Simple integers with validation.
	//
	// POST /simpleInteger
	SimpleInteger(ctx context.Context, req int) error
	// SimpleObjects implements simpleObjects operation.
	//
	// Simple objects.
	//
	// POST /simpleObjects
	SimpleObjects(ctx context.Context, req *SimpleObjectsReq) error
	// StringsNotype implements stringsNotype operation.
	//
	// POST /stringsNotype
	StringsNotype(ctx context.Context, req NilString) error
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// NullableStrings invokes nullableStrings operation.
	//
	// Nullable strings.
	//
	// POST /nullableStrings
	NullableStrings(ctx context.Context, request NilString) error
	// ObjectsWithConflictingArrayProperty invokes objectsWithConflictingArrayProperty operation.
	//
	// Objects with conflicting array property.
	//
	// POST /objectsWithConflictingArrayProperty
	ObjectsWithConflictingArrayProperty(ctx context.Context, request *ObjectsWithConflictingArrayPropertyReq) error
	// ObjectsWithConflictingProperties invokes objectsWithConflictingProperties operation.
	//
	// Objects with conflicting properties.
	//
	// POST /objectsWithConflictingProperties
	ObjectsWithConflictingProperties(ctx context.Context, request *ObjectsWithConflictingPropertiesReq) error
	// ReferencedAllof invokes referencedAllof operation.
	//
	// Referenced allOf.
	//
	// POST /referencedAllof
	ReferencedAllof(ctx context.Context, request ReferencedAllofReq) error
	// ReferencedAllofOptional invokes referencedAllofOptional operation.
	//
	// Referenced allOf, but requestBody is not required.
	//
	// POST /referencedAllofOptional
	ReferencedAllofOptional(ctx context.Context, request ReferencedAllofOptionalReq) error
	// SimpleInteger invokes simpleInteger operation.
	//
	// Simple integers with validation.
	//
	// POST /simpleInteger
	SimpleInteger(ctx context.Context, request int) error
	// SimpleObjects invokes simpleObjects operation.
	//
	// Simple objects.
	//
	// POST /simpleObjects
	SimpleObjects(ctx context.Context, request *SimpleObjectsReq) error
	// StringsNotype invokes stringsNotype operation.
	//
	// POST /stringsNotype
	StringsNotype(ctx context.Context, request NilString) error
}

Invoker invokes operations described by OpenAPI v3 specification.

type Location

type Location struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
}

Ref: #/components/schemas/Location

func (*Location) Decode

func (s *Location) Decode(d *jx.Decoder) error

Decode decodes Location from json.

func (*Location) Encode

func (s *Location) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Location) GetLat

func (s *Location) GetLat() float64

GetLat returns the value of Lat.

func (*Location) GetLon

func (s *Location) GetLon() float64

GetLon returns the value of Lon.

func (*Location) MarshalJSON

func (s *Location) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Location) SetFake

func (s *Location) SetFake()

SetFake set fake values.

func (*Location) SetLat

func (s *Location) SetLat(val float64)

SetLat sets the value of Lat.

func (*Location) SetLon

func (s *Location) SetLon(val float64)

SetLon sets the value of Lon.

func (*Location) UnmarshalJSON

func (s *Location) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Location) Validate

func (s *Location) Validate() error

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type NilString

type NilString struct {
	Value string
	Null  bool
}

NilString is nullable string.

func NewNilString

func NewNilString(v string) NilString

NewNilString returns new NilString with value set to v.

func (*NilString) Decode

func (o *NilString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (NilString) Encode

func (o NilString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (NilString) Get

func (o NilString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (NilString) IsNull

func (o NilString) IsNull() bool

IsSet returns true if value is Null.

func (NilString) MarshalJSON

func (s NilString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (NilString) Or

func (o NilString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*NilString) SetFake

func (s *NilString) SetFake()

SetFake set fake values.

func (*NilString) SetTo

func (o *NilString) SetTo(v string)

SetTo sets value to v.

func (*NilString) SetToNull

func (o *NilString) SetToNull()

SetNull sets value to null.

func (*NilString) UnmarshalJSON

func (s *NilString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type NullableStringsOK

type NullableStringsOK struct{}

NullableStringsOK is response for NullableStrings operation.

type ObjectsWithConflictingArrayPropertyOK

type ObjectsWithConflictingArrayPropertyOK struct{}

ObjectsWithConflictingArrayPropertyOK is response for ObjectsWithConflictingArrayProperty operation.

type ObjectsWithConflictingArrayPropertyReq

type ObjectsWithConflictingArrayPropertyReq struct {
	// Merged property.
	Foo []int `json:"foo"`
	Bar int   `json:"bar"`
}

Merged schema.

func (*ObjectsWithConflictingArrayPropertyReq) Decode

Decode decodes ObjectsWithConflictingArrayPropertyReq from json.

func (*ObjectsWithConflictingArrayPropertyReq) Encode

Encode implements json.Marshaler.

func (*ObjectsWithConflictingArrayPropertyReq) GetBar

GetBar returns the value of Bar.

func (*ObjectsWithConflictingArrayPropertyReq) GetFoo

GetFoo returns the value of Foo.

func (*ObjectsWithConflictingArrayPropertyReq) MarshalJSON

func (s *ObjectsWithConflictingArrayPropertyReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ObjectsWithConflictingArrayPropertyReq) SetBar

SetBar sets the value of Bar.

func (*ObjectsWithConflictingArrayPropertyReq) SetFake

SetFake set fake values.

func (*ObjectsWithConflictingArrayPropertyReq) SetFoo

SetFoo sets the value of Foo.

func (*ObjectsWithConflictingArrayPropertyReq) UnmarshalJSON

func (s *ObjectsWithConflictingArrayPropertyReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ObjectsWithConflictingArrayPropertyReq) Validate

type ObjectsWithConflictingPropertiesOK

type ObjectsWithConflictingPropertiesOK struct{}

ObjectsWithConflictingPropertiesOK is response for ObjectsWithConflictingProperties operation.

type ObjectsWithConflictingPropertiesReq

type ObjectsWithConflictingPropertiesReq struct {
	// Merged property.
	Foo string `json:"foo"`
	Bar OptInt `json:"bar"`
}

Merged schema.

func (*ObjectsWithConflictingPropertiesReq) Decode

Decode decodes ObjectsWithConflictingPropertiesReq from json.

func (*ObjectsWithConflictingPropertiesReq) Encode

Encode implements json.Marshaler.

func (*ObjectsWithConflictingPropertiesReq) GetBar

GetBar returns the value of Bar.

func (*ObjectsWithConflictingPropertiesReq) GetFoo

GetFoo returns the value of Foo.

func (*ObjectsWithConflictingPropertiesReq) MarshalJSON

func (s *ObjectsWithConflictingPropertiesReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ObjectsWithConflictingPropertiesReq) SetBar

SetBar sets the value of Bar.

func (*ObjectsWithConflictingPropertiesReq) SetFake

SetFake set fake values.

func (*ObjectsWithConflictingPropertiesReq) SetFoo

SetFoo sets the value of Foo.

func (*ObjectsWithConflictingPropertiesReq) UnmarshalJSON

func (s *ObjectsWithConflictingPropertiesReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ObjectsWithConflictingPropertiesReq) Validate

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetFake

func (s *OptBool) SetFake()

SetFake set fake values.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetFake

func (s *OptInt) SetFake()

SetFake set fake values.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetFake

func (s *OptString) SetFake()

SetFake set fake values.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type ReferencedAllofOK

type ReferencedAllofOK struct{}

ReferencedAllofOK is response for ReferencedAllof operation.

type ReferencedAllofOptionalOK

type ReferencedAllofOptionalOK struct{}

ReferencedAllofOptionalOK is response for ReferencedAllofOptional operation.

type ReferencedAllofOptionalReq

type ReferencedAllofOptionalReq interface {
	// contains filtered or unexported methods
}

type ReferencedAllofOptionalReqEmptyBody

type ReferencedAllofOptionalReqEmptyBody struct{}

type ReferencedAllofReq

type ReferencedAllofReq interface {
	// contains filtered or unexported methods
}

type Robot

type Robot struct {
	State    RobotState `json:"state"`
	ID       uuid.UUID  `json:"id"`
	Location Location   `json:"location"`
}

Merged schema. Ref: #/components/schemas/Robot

func (*Robot) Decode

func (s *Robot) Decode(d *jx.Decoder) error

Decode decodes Robot from json.

func (*Robot) Encode

func (s *Robot) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Robot) GetID

func (s *Robot) GetID() uuid.UUID

GetID returns the value of ID.

func (*Robot) GetLocation

func (s *Robot) GetLocation() Location

GetLocation returns the value of Location.

func (*Robot) GetState

func (s *Robot) GetState() RobotState

GetState returns the value of State.

func (*Robot) MarshalJSON

func (s *Robot) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Robot) SetFake

func (s *Robot) SetFake()

SetFake set fake values.

func (*Robot) SetID

func (s *Robot) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*Robot) SetLocation

func (s *Robot) SetLocation(val Location)

SetLocation sets the value of Location.

func (*Robot) SetState

func (s *Robot) SetState(val RobotState)

SetState sets the value of State.

func (*Robot) UnmarshalJSON

func (s *Robot) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Robot) Validate

func (s *Robot) Validate() error

type RobotMultipart

type RobotMultipart struct {
	State    RobotMultipartState `json:"state"`
	ID       uuid.UUID           `json:"id"`
	Location Location            `json:"location"`
}

Merged schema. Ref: #/components/schemas/Robot

func (*RobotMultipart) GetID

func (s *RobotMultipart) GetID() uuid.UUID

GetID returns the value of ID.

func (*RobotMultipart) GetLocation

func (s *RobotMultipart) GetLocation() Location

GetLocation returns the value of Location.

func (*RobotMultipart) GetState

func (s *RobotMultipart) GetState() RobotMultipartState

GetState returns the value of State.

func (*RobotMultipart) SetID

func (s *RobotMultipart) SetID(val uuid.UUID)

SetID sets the value of ID.

func (*RobotMultipart) SetLocation

func (s *RobotMultipart) SetLocation(val Location)

SetLocation sets the value of Location.

func (*RobotMultipart) SetState

func (s *RobotMultipart) SetState(val RobotMultipartState)

SetState sets the value of State.

func (*RobotMultipart) Validate

func (s *RobotMultipart) Validate() error

type RobotMultipartState

type RobotMultipartState string
const (
	RobotMultipartStateOn  RobotMultipartState = "on"
	RobotMultipartStateOff RobotMultipartState = "off"
)

func (RobotMultipartState) AllValues

AllValues returns all RobotMultipartState values.

func (RobotMultipartState) MarshalText

func (s RobotMultipartState) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*RobotMultipartState) UnmarshalText

func (s *RobotMultipartState) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (RobotMultipartState) Validate

func (s RobotMultipartState) Validate() error

type RobotState

type RobotState string
const (
	RobotStateOn  RobotState = "on"
	RobotStateOff RobotState = "off"
)

func (RobotState) AllValues

func (RobotState) AllValues() []RobotState

AllValues returns all RobotState values.

func (*RobotState) Decode

func (s *RobotState) Decode(d *jx.Decoder) error

Decode decodes RobotState from json.

func (RobotState) Encode

func (s RobotState) Encode(e *jx.Encoder)

Encode encodes RobotState as json.

func (RobotState) MarshalJSON

func (s RobotState) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (RobotState) MarshalText

func (s RobotState) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*RobotState) SetFake

func (s *RobotState) SetFake()

SetFake set fake values.

func (*RobotState) UnmarshalJSON

func (s *RobotState) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RobotState) UnmarshalText

func (s *RobotState) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (RobotState) Validate

func (s RobotState) Validate() error

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type SimpleIntegerOK

type SimpleIntegerOK struct{}

SimpleIntegerOK is response for SimpleInteger operation.

type SimpleObjectsOK

type SimpleObjectsOK struct{}

SimpleObjectsOK is response for SimpleObjects operation.

type SimpleObjectsReq

type SimpleObjectsReq struct {
	Foo OptString `json:"foo"`
	Bar OptBool   `json:"bar"`
}

Merged schema.

func (*SimpleObjectsReq) Decode

func (s *SimpleObjectsReq) Decode(d *jx.Decoder) error

Decode decodes SimpleObjectsReq from json.

func (*SimpleObjectsReq) Encode

func (s *SimpleObjectsReq) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SimpleObjectsReq) GetBar

func (s *SimpleObjectsReq) GetBar() OptBool

GetBar returns the value of Bar.

func (*SimpleObjectsReq) GetFoo

func (s *SimpleObjectsReq) GetFoo() OptString

GetFoo returns the value of Foo.

func (*SimpleObjectsReq) MarshalJSON

func (s *SimpleObjectsReq) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SimpleObjectsReq) SetBar

func (s *SimpleObjectsReq) SetBar(val OptBool)

SetBar sets the value of Bar.

func (*SimpleObjectsReq) SetFake

func (s *SimpleObjectsReq) SetFake()

SetFake set fake values.

func (*SimpleObjectsReq) SetFoo

func (s *SimpleObjectsReq) SetFoo(val OptString)

SetFoo sets the value of Foo.

func (*SimpleObjectsReq) UnmarshalJSON

func (s *SimpleObjectsReq) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type StringsNotypeOK

type StringsNotypeOK struct{}

StringsNotypeOK is response for StringsNotype operation.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) NullableStrings

func (UnimplementedHandler) NullableStrings(ctx context.Context, req NilString) error

NullableStrings implements nullableStrings operation.

Nullable strings.

POST /nullableStrings

func (UnimplementedHandler) ObjectsWithConflictingArrayProperty

func (UnimplementedHandler) ObjectsWithConflictingArrayProperty(ctx context.Context, req *ObjectsWithConflictingArrayPropertyReq) error

ObjectsWithConflictingArrayProperty implements objectsWithConflictingArrayProperty operation.

Objects with conflicting array property.

POST /objectsWithConflictingArrayProperty

func (UnimplementedHandler) ObjectsWithConflictingProperties

func (UnimplementedHandler) ObjectsWithConflictingProperties(ctx context.Context, req *ObjectsWithConflictingPropertiesReq) error

ObjectsWithConflictingProperties implements objectsWithConflictingProperties operation.

Objects with conflicting properties.

POST /objectsWithConflictingProperties

func (UnimplementedHandler) ReferencedAllof

func (UnimplementedHandler) ReferencedAllof(ctx context.Context, req ReferencedAllofReq) error

ReferencedAllof implements referencedAllof operation.

Referenced allOf.

POST /referencedAllof

func (UnimplementedHandler) ReferencedAllofOptional

func (UnimplementedHandler) ReferencedAllofOptional(ctx context.Context, req ReferencedAllofOptionalReq) error

ReferencedAllofOptional implements referencedAllofOptional operation.

Referenced allOf, but requestBody is not required.

POST /referencedAllofOptional

func (UnimplementedHandler) SimpleInteger

func (UnimplementedHandler) SimpleInteger(ctx context.Context, req int) error

SimpleInteger implements simpleInteger operation.

Simple integers with validation.

POST /simpleInteger

func (UnimplementedHandler) SimpleObjects

func (UnimplementedHandler) SimpleObjects(ctx context.Context, req *SimpleObjectsReq) error

SimpleObjects implements simpleObjects operation.

Simple objects.

POST /simpleObjects

func (UnimplementedHandler) StringsNotype

func (UnimplementedHandler) StringsNotype(ctx context.Context, req NilString) error

StringsNotype implements stringsNotype operation.

POST /stringsNotype

Jump to

Keyboard shortcuts

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