v3

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractEncoding

func ExtractEncoding(elements map[lowmodel.KeyReference[string]]lowmodel.ValueReference[*low.Encoding]) map[string]*Encoding

func ExtractExamples

func ExtractExamples(elements map[lowmodel.KeyReference[string]]lowmodel.ValueReference[*low.Example]) map[string]*Example

func ExtractHeaders

func ExtractHeaders(elements map[lowmodel.KeyReference[string]]lowmodel.ValueReference[*low.Header]) map[string]*Header

Types

type Callback

type Callback struct {
	Expression map[string]*PathItem
	Extensions map[string]any
	// contains filtered or unexported fields
}

func NewCallback

func NewCallback(lowCallback *low.Callback) *Callback

func (*Callback) GoLow

func (c *Callback) GoLow() *low.Callback

type Components

type Components struct {
	Schemas         map[string]*SchemaProxy
	Responses       map[string]*Response
	Parameters      map[string]*Parameter
	Examples        map[string]*Example
	RequestBodies   map[string]*RequestBody
	Headers         map[string]*Header
	SecuritySchemes map[string]*SecurityScheme
	Links           map[string]*Link
	Callbacks       map[string]*Callback
	Extensions      map[string]any
	// contains filtered or unexported fields
}

func NewComponents

func NewComponents(comp *low.Components) *Components

func (*Components) GoLow

func (c *Components) GoLow() *low.Components

type Contact

type Contact struct {
	Name  string
	URL   string
	Email string
	// contains filtered or unexported fields
}

func NewContact

func NewContact(contact *low.Contact) *Contact

func (*Contact) GoLow

func (c *Contact) GoLow() *low.Contact

type Discriminator

type Discriminator struct {
	PropertyName string
	Mapping      map[string]string
	// contains filtered or unexported fields
}

func NewDiscriminator

func NewDiscriminator(disc *low.Discriminator) *Discriminator

func (*Discriminator) GoLow

func (d *Discriminator) GoLow() *low.Discriminator

type Document

type Document struct {
	Version      string
	Info         *Info
	Servers      []*Server
	Paths        *Paths
	Components   *Components
	Security     *SecurityRequirement
	Tags         []*Tag
	ExternalDocs *ExternalDoc
	Extensions   map[string]any
	Index        *index.SpecIndex
	// contains filtered or unexported fields
}

func NewDocument

func NewDocument(document *low.Document) *Document

func (*Document) GoLow

func (d *Document) GoLow() *low.Document

type Encoding

type Encoding struct {
	ContentType   string
	Headers       map[string]*Header
	Style         string
	Explode       bool
	AllowReserved bool
	// contains filtered or unexported fields
}

func NewEncoding

func NewEncoding(encoding *low.Encoding) *Encoding

func (*Encoding) GoLow

func (e *Encoding) GoLow() *low.Encoding

type Example

type Example struct {
	Summary       string
	Description   string
	Value         any
	ExternalValue string
	Extensions    map[string]any
	// contains filtered or unexported fields
}

func NewExample

func NewExample(example *low.Example) *Example

func (*Example) GoLow

func (e *Example) GoLow() *low.Example

type ExternalDoc

type ExternalDoc struct {
	Description string
	URL         string
	Extensions  map[string]any
	// contains filtered or unexported fields
}

func NewExternalDoc

func NewExternalDoc(extDoc *low.ExternalDoc) *ExternalDoc

func (*ExternalDoc) GoLow

func (e *ExternalDoc) GoLow() *low.ExternalDoc
type Header struct {
	Description     string
	Required        bool
	Deprecated      bool
	AllowEmptyValue bool
	Style           string
	Explode         bool
	AllowReserved   bool
	Schema          *SchemaProxy
	Example         any
	Examples        map[string]*Example
	Content         map[string]*MediaType
	Extensions      map[string]any
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader(header *low.Header) *Header

func (*Header) GoLow

func (h *Header) GoLow() *low.Header

type Info

type Info struct {
	Title          string
	Description    string
	TermsOfService string
	Contact        *Contact
	License        *License
	Version        string
	// contains filtered or unexported fields
}

func NewInfo

func NewInfo(info *low.Info) *Info

func (*Info) GoLow

func (i *Info) GoLow() *low.Info

type License

type License struct {
	Name string
	URL  string
	// contains filtered or unexported fields
}

func NewLicense

func NewLicense(license *low.License) *License

func (*License) GoLow

func (l *License) GoLow() *low.License
type Link struct {
	OperationRef string
	OperationId  string
	Parameters   map[string]string
	RequestBody  string
	Description  string
	Server       *Server
	Extensions   map[string]any
	// contains filtered or unexported fields
}
func NewLink(link *low.Link) *Link

func (*Link) GoLow

func (l *Link) GoLow() *low.Link

type MediaType

type MediaType struct {
	Schema     *SchemaProxy
	Example    any
	Examples   map[string]*Example
	Encoding   map[string]*Encoding
	Extensions map[string]any
	// contains filtered or unexported fields
}

func NewMediaType

func NewMediaType(mediaType *low.MediaType) *MediaType

func (*MediaType) GoLow

func (m *MediaType) GoLow() *low.MediaType

type OAuthFlow

type OAuthFlow struct {
	AuthorizationUrl string
	TokenUrl         string
	RefreshUrl       string
	Scopes           map[string]string
	Extensions       map[string]any
	// contains filtered or unexported fields
}

func NewOAuthFlow

func NewOAuthFlow(flow *low.OAuthFlow) *OAuthFlow

func (*OAuthFlow) GoLow

func (o *OAuthFlow) GoLow() *low.OAuthFlow

type OAuthFlows

type OAuthFlows struct {
	Implicit          *OAuthFlow
	Password          *OAuthFlow
	ClientCredentials *OAuthFlow
	AuthorizationCode *OAuthFlow
	Extensions        map[string]any
	// contains filtered or unexported fields
}

func NewOAuthFlows

func NewOAuthFlows(flows *low.OAuthFlows) *OAuthFlows

func (*OAuthFlows) GoLow

func (o *OAuthFlows) GoLow() *low.OAuthFlows

type Operation

type Operation struct {
	Tags         []string
	Summary      string
	Description  string
	ExternalDocs *ExternalDoc
	OperationId  string
	Parameters   []*Parameter
	RequestBody  *RequestBody
	Responses    *Responses
	Callbacks    map[string]*Callback
	Deprecated   bool
	Security     *SecurityRequirement
	Servers      []*Server
	Extensions   map[string]any
	// contains filtered or unexported fields
}

func NewOperation

func NewOperation(operation *low.Operation) *Operation

func (*Operation) GoLow

func (o *Operation) GoLow() *low.Operation

type Parameter

type Parameter struct {
	Name            string
	In              string
	Description     string
	Required        bool
	Deprecated      bool
	AllowEmptyValue bool
	Style           string
	Explode         bool
	AllowReserved   bool
	Schema          *SchemaProxy
	Example         any
	Examples        map[string]*Example
	Content         map[string]*MediaType
	Extensions      map[string]any
	// contains filtered or unexported fields
}

func NewParameter

func NewParameter(param *low.Parameter) *Parameter

func (*Parameter) GoLow

func (p *Parameter) GoLow() *low.Parameter

type PathItem

type PathItem struct {
	Description string
	Summary     string
	Get         *Operation
	Put         *Operation
	Post        *Operation
	Delete      *Operation
	Options     *Operation
	Head        *Operation
	Patch       *Operation
	Trace       *Operation
	Servers     []*Server
	Parameters  []*Parameter
	Extensions  map[string]any
	// contains filtered or unexported fields
}

func NewPathItem

func NewPathItem(pathItem *low.PathItem) *PathItem

func (*PathItem) GoLow

func (p *PathItem) GoLow() *low.PathItem

type Paths

type Paths struct {
	PathItems  map[string]*PathItem
	Extensions map[string]any
	// contains filtered or unexported fields
}

func NewPaths

func NewPaths(paths *low.Paths) *Paths

func (*Paths) GoLow

func (p *Paths) GoLow() *low.Paths

type RequestBody

type RequestBody struct {
	Description string
	Content     map[string]*MediaType
	Required    bool
	Extensions  map[string]any
	// contains filtered or unexported fields
}

func NewRequestBody

func NewRequestBody(rb *low.RequestBody) *RequestBody

func (*RequestBody) GoLow

func (r *RequestBody) GoLow() *low.RequestBody

type Response

type Response struct {
	Description string
	Headers     map[string]*Header
	Content     map[string]*MediaType
	Extensions  map[string]any
	Links       map[string]*Link
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(response *low.Response) *Response

func (*Response) GoLow

func (r *Response) GoLow() *low.Response

type Responses

type Responses struct {
	Codes   map[string]*Response
	Default *Response
	// contains filtered or unexported fields
}

func NewResponses

func NewResponses(response *low.Responses) *Responses

func (*Responses) FindResponseByCode

func (r *Responses) FindResponseByCode(code int) *Response

func (*Responses) GoLow

func (r *Responses) GoLow() *low.Responses

type Schema

type Schema struct {
	Title                string
	MultipleOf           int
	Maximum              int
	ExclusiveMaximum     int
	Minimum              int
	ExclusiveMinimum     int
	MaxLength            int
	MinLength            int
	Pattern              string
	Format               string
	MaxItems             int
	MinItems             int
	UniqueItems          int
	MaxProperties        int
	MinProperties        int
	Required             []string
	Enum                 []string
	Type                 string
	AllOf                []*SchemaProxy
	OneOf                []*SchemaProxy
	AnyOf                []*SchemaProxy
	Not                  []*SchemaProxy
	Items                []*SchemaProxy
	Properties           map[string]*SchemaProxy
	AdditionalProperties any
	Description          string
	Default              any
	Nullable             bool
	Discriminator        *Discriminator
	ReadOnly             bool
	WriteOnly            bool
	XML                  *XML
	ExternalDocs         *ExternalDoc
	Example              any
	Deprecated           bool
	Extensions           map[string]any
	// contains filtered or unexported fields
}

func NewSchema

func NewSchema(schema *low.Schema) *Schema

func (*Schema) GoLow

func (s *Schema) GoLow() *low.Schema

type SchemaProxy

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

func (*SchemaProxy) GetBuildError

func (sp *SchemaProxy) GetBuildError() error

func (*SchemaProxy) Schema

func (sp *SchemaProxy) Schema() *Schema

type SecurityRequirement

type SecurityRequirement struct {
	ValueRequirements []map[string][]string
	// contains filtered or unexported fields
}

func NewSecurityRequirement

func NewSecurityRequirement(req *low.SecurityRequirement) *SecurityRequirement

func (*SecurityRequirement) GoLow

type SecurityScheme

type SecurityScheme struct {
	Type             string
	Description      string
	Name             string
	In               string
	Scheme           string
	BearerFormat     string
	Flows            *OAuthFlows
	OpenIdConnectUrl string
	Extensions       map[string]any
	// contains filtered or unexported fields
}

func NewSecurityScheme

func NewSecurityScheme(ss *low.SecurityScheme) *SecurityScheme

func (*SecurityScheme) GoLow

func (s *SecurityScheme) GoLow() *low.SecurityScheme

type Server

type Server struct {
	URL         string
	Description string
	Variables   map[string]*ServerVariable
	// contains filtered or unexported fields
}

func NewServer

func NewServer(server *low.Server) *Server

func (*Server) GoLow

func (s *Server) GoLow() *low.Server

type ServerVariable

type ServerVariable struct {
	Enum        []string
	Default     string
	Description string
	// contains filtered or unexported fields
}

func NewServerVariable

func NewServerVariable(variable *low.ServerVariable) *ServerVariable

func (*ServerVariable) GoLow

func (s *ServerVariable) GoLow() *low.ServerVariable

type Tag

type Tag struct {
	Name         string
	Description  string
	ExternalDocs *ExternalDoc
	Extensions   map[string]any
	// contains filtered or unexported fields
}

func NewTag

func NewTag(tag *low.Tag) *Tag

func (*Tag) GoLow

func (t *Tag) GoLow() *low.Tag

type XML

type XML struct {
	Name       string
	Namespace  string
	Prefix     string
	Attribute  bool
	Wrapped    bool
	Extensions map[string]any
	// contains filtered or unexported fields
}

func NewXML

func NewXML(xml *low.XML) *XML

func (*XML) GoLow

func (x *XML) GoLow() *low.XML

Jump to

Keyboard shortcuts

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