Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDocumentFromFile ¶
NewDocumentFromFile creates a new Document from a file path
func NewSchemaFromKin ¶
NewSchemaFromKin creates a new Scheme from a Kin schema
Types ¶
type Document ¶
Document is a wrapper around openapi3.T Implements Document interface
func (*Document) FindOperation ¶
func (d *Document) FindOperation(options *openapi.OperationDescription) openapi.Operation
FindOperation finds an operation by resource and method.
func (*Document) GetResources ¶
GetResources returns a map of resource names and their methods.
func (*Document) GetSecurity ¶ added in v0.1.29
func (d *Document) GetSecurity() openapi.SecurityComponents
func (*Document) GetVersion ¶
GetVersion returns the version of the document
func (*Document) Provider ¶
func (d *Document) Provider() config.SchemaProvider
Provider returns the SchemaProvider for this document
type KinOperation ¶
KinOperation is a wrapper around openapi3.Operation
func (*KinOperation) GetRequest ¶ added in v0.1.29
func (op *KinOperation) GetRequest(securityComponents openapi.SecurityComponents) *openapi.Request
func (*KinOperation) GetResponse ¶
func (op *KinOperation) GetResponse() *openapi.Response
GetResponse returns the operation response
func (*KinOperation) WithParseConfig ¶
func (op *KinOperation) WithParseConfig(config *config.ParseConfig) openapi.Operation
WithParseConfig sets the parse config for this operation
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func (*Validator) ValidateRequest ¶
func (v *Validator) ValidateRequest(req *openapi.GeneratedRequest) []error
ValidateRequest validates GeneratedRequest against a schema.
func (*Validator) ValidateResponse ¶
func (v *Validator) ValidateResponse(res *openapi.GeneratedResponse) []error
ValidateResponse validates a response against an Operation. GeneratedResponse must contain non-empty headers or it'll fail validation.