Documentation ¶
Index ¶
- Constants
- func GetEndpointName(verb entity.Verb, operationId string, key string) string
- func GetHeader(operation *openapi3.Operation, securitySchemes []entity.Security) map[string]entity.HeaderProperty
- func GetParams(operation *openapi3.Operation) []entity.ParamProperty
- func GetPropertyName(name string) string
- func GetPropertyType(name string) string
- func GetResponseName(code string, key string) string
- func GetSchemaName(id string) string
- func GetStatus(status string) int
- func IsRediret(status string) bool
- func KeyToName(verb entity.Verb, key string) string
- func KeyToPath(key string) string
- func ParseDocument(ctx context.Context, options ParseOptions) (*entity.TemplateData, error)
- type ParseOptions
- type SchemaParser
- func (p *SchemaParser) AddArray(ref string, name string, schema *openapi3.Schema, display bool) *entity.Schema
- func (p *SchemaParser) AddBoolean(ref string, name string, schema *openapi3.Schema, display bool) *entity.Schema
- func (p *SchemaParser) AddFloat(ref string, name string, schema *openapi3.Schema, display bool) *entity.Schema
- func (p *SchemaParser) AddInteger(ref string, name string, schema *openapi3.Schema, display bool) *entity.Schema
- func (p *SchemaParser) AddObject(ref string, name string, schema *openapi3.Schema, display bool) *entity.Schema
- func (p *SchemaParser) AddString(ref string, name string, schema *openapi3.Schema, display bool) *entity.Schema
- func (p *SchemaParser) GetBody(operation *openapi3.Operation) entity.BodyProperty
- func (p *SchemaParser) GetBySchema(oapiSchema *openapi3.Schema) *entity.Schema
- func (p *SchemaParser) GetEndpoints() []*entity.Endpoint
- func (p *SchemaParser) GetQuery(operation *openapi3.Operation) map[string]entity.QueryProperty
- func (p *SchemaParser) GetResponses(operation *openapi3.Operation, s map[*openapi3.Schema]*entity.Schema) entity.Response
- func (p *SchemaParser) GetSchemas() []*entity.Schema
- func (p *SchemaParser) Parse(doc *openapi3.T)
- func (p *SchemaParser) SetByName(oapiSchema *openapi3.Schema, schema *entity.Schema)
Constants ¶
View Source
const CONTENT_JSON = "application/json"
View Source
const CONTENT_TEXT = "text/plain"
View Source
const CONTENT_URL = "application/x-www-form-urlencoded"
View Source
const CONTENT_XML = "application/xml"
Variables ¶
This section is empty.
Functions ¶
func GetEndpointName ¶
func GetPropertyName ¶
func GetPropertyType ¶
func GetResponseName ¶
func GetSchemaName ¶
func ParseDocument ¶
func ParseDocument(ctx context.Context, options ParseOptions) (*entity.TemplateData, error)
Types ¶
type ParseOptions ¶
type SchemaParser ¶
type SchemaParser struct {
// contains filtered or unexported fields
}
func NewSchemaParser ¶
func NewSchemaParser() SchemaParser
func (*SchemaParser) AddBoolean ¶
func (*SchemaParser) AddInteger ¶
func (*SchemaParser) GetBody ¶
func (p *SchemaParser) GetBody(operation *openapi3.Operation) entity.BodyProperty
func (*SchemaParser) GetBySchema ¶
func (p *SchemaParser) GetBySchema(oapiSchema *openapi3.Schema) *entity.Schema
func (*SchemaParser) GetEndpoints ¶
func (p *SchemaParser) GetEndpoints() []*entity.Endpoint
func (*SchemaParser) GetQuery ¶
func (p *SchemaParser) GetQuery(operation *openapi3.Operation) map[string]entity.QueryProperty
func (*SchemaParser) GetResponses ¶
func (*SchemaParser) GetSchemas ¶
func (p *SchemaParser) GetSchemas() []*entity.Schema
func (*SchemaParser) Parse ¶
func (p *SchemaParser) Parse(doc *openapi3.T)
Click to show internal directories.
Click to hide internal directories.