openapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	Name  string       `json:"name,omitempty"`
	URL   url.URL      `json:"url,omitempty"`
	Email mail.Address `json:"email,omitempty"`
}

@block "configuration"

func (Contact) MarshalJSON

func (c Contact) MarshalJSON() ([]byte, error)

type ContactInterpreter

type ContactInterpreter struct {
}

ContactInterpreter is the Conflow interpreter for the Contact block

func (ContactInterpreter) CreateBlock

func (i ContactInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Contact block

func (ContactInterpreter) Param

func (i ContactInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ContactInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ContactInterpreter) Schema

func (i ContactInterpreter) Schema() schema.Schema

func (ContactInterpreter) SetBlock

func (i ContactInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ContactInterpreter) SetParam

func (i ContactInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ContactInterpreter) ValueParamName

func (i ContactInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Info

type Info struct {
	// @required
	Title          string   `json:"title"`
	Summary        string   `json:"summary,omitempty"`
	Description    string   `json:"description,omitempty"`
	TermsOfService string   `json:"termsOfService,omitempty"`
	Contact        *Contact `json:"contact,omitempty"`
	License        *License `json:"license,omitempty"`
	// @required
	Version string `json:"version,omitempty"`
}

@block "configuration"

func (*Info) ParseContextOverride

func (i *Info) ParseContextOverride() conflow.ParseContextOverride

type InfoInterpreter

type InfoInterpreter struct {
}

InfoInterpreter is the Conflow interpreter for the Info block

func (InfoInterpreter) CreateBlock

func (i InfoInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Info block

func (InfoInterpreter) Param

func (i InfoInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (InfoInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (InfoInterpreter) Schema

func (i InfoInterpreter) Schema() schema.Schema

func (InfoInterpreter) SetBlock

func (i InfoInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (InfoInterpreter) SetParam

func (i InfoInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (InfoInterpreter) ValueParamName

func (i InfoInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type License

type License struct {
	// @required
	Name       string  `json:"name,omitempty"`
	Identifier string  `json:"identifier,omitempty"`
	URL        url.URL `json:"url"`
}

@block "configuration"

func (License) MarshalJSON

func (l License) MarshalJSON() ([]byte, error)

type LicenseInterpreter

type LicenseInterpreter struct {
}

LicenseInterpreter is the Conflow interpreter for the License block

func (LicenseInterpreter) CreateBlock

func (i LicenseInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new License block

func (LicenseInterpreter) Param

func (i LicenseInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (LicenseInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (LicenseInterpreter) Schema

func (i LicenseInterpreter) Schema() schema.Schema

func (LicenseInterpreter) SetBlock

func (i LicenseInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (LicenseInterpreter) SetParam

func (i LicenseInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (LicenseInterpreter) ValueParamName

func (i LicenseInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type MediaType

type MediaType struct {
	Schema schema.Schema `json:"schema,omitempty"`
}

@block "configuration"

func (*MediaType) ParseContextOverride

func (m *MediaType) ParseContextOverride() conflow.ParseContextOverride

type MediaTypeInterpreter

type MediaTypeInterpreter struct {
}

MediaTypeInterpreter is the Conflow interpreter for the MediaType block

func (MediaTypeInterpreter) CreateBlock

func (i MediaTypeInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new MediaType block

func (MediaTypeInterpreter) Param

func (i MediaTypeInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (MediaTypeInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (MediaTypeInterpreter) Schema

func (i MediaTypeInterpreter) Schema() schema.Schema

func (MediaTypeInterpreter) SetBlock

func (i MediaTypeInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (MediaTypeInterpreter) SetParam

func (i MediaTypeInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (MediaTypeInterpreter) ValueParamName

func (i MediaTypeInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type OpenAPI

type OpenAPI struct {
	// @required
	// @name "openapi"
	OpenAPI string `json:"openapi"`
	// @required
	Info *Info `json:"info"`
	// @name "server"
	Servers []*Server `json:"servers,omitempty"`
	// @name "path"
	Paths map[string]*PathItem `json:"paths"`
	Tags  []string             `json:"tags,omitempty"`

	// @name "schema"
	Schemas map[string]schema.Schema `json:"-"`
	// @name "response"
	Responses map[string]*Response `json:"-"`
	// @name "parameter"
	Parameters map[string]*Parameter `json:"-"`
	// @name "request_body"
	RequestBodies map[string]*RequestBody `json:"-"`
}

@block "main"

func (*OpenAPI) MarshalJSON

func (o *OpenAPI) MarshalJSON() ([]byte, error)

func (*OpenAPI) ParseContextOverride

func (o *OpenAPI) ParseContextOverride() conflow.ParseContextOverride

type OpenAPIInterpreter

type OpenAPIInterpreter struct {
}

OpenAPIInterpreter is the Conflow interpreter for the OpenAPI block

func (OpenAPIInterpreter) CreateBlock

func (i OpenAPIInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new OpenAPI block

func (OpenAPIInterpreter) Param

func (i OpenAPIInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (OpenAPIInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (OpenAPIInterpreter) Schema

func (i OpenAPIInterpreter) Schema() schema.Schema

func (OpenAPIInterpreter) SetBlock

func (i OpenAPIInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (OpenAPIInterpreter) SetParam

func (i OpenAPIInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (OpenAPIInterpreter) ValueParamName

func (i OpenAPIInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Operation

type Operation struct {
	Tags        []string `json:"tags,omitempty"`
	Summary     string   `json:"summary,omitempty"`
	Description string   `json:"description,omitempty"`
	// @required
	OperationID string `json:"operationId"`
	// @name "parameter"
	Parameters  []*Parameter `json:"parameters,omitempty"`
	RequestBody *RequestBody `json:"requestBody,omitempty"`
	// @name "response"
	Responses  map[string]*Response `json:"responses,omitempty"`
	Deprecated bool                 `json:"deprecated,omitempty"`
	// @name "server"
	Servers []*Server `json:"servers,omitempty"`
}

@block "configuration"

func (*Operation) ParseContextOverride

func (o *Operation) ParseContextOverride() conflow.ParseContextOverride

type OperationInterpreter

type OperationInterpreter struct {
}

OperationInterpreter is the Conflow interpreter for the Operation block

func (OperationInterpreter) CreateBlock

func (i OperationInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Operation block

func (OperationInterpreter) Param

func (i OperationInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (OperationInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (OperationInterpreter) Schema

func (i OperationInterpreter) Schema() schema.Schema

func (OperationInterpreter) SetBlock

func (i OperationInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (OperationInterpreter) SetParam

func (i OperationInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (OperationInterpreter) ValueParamName

func (i OperationInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Parameter

type Parameter struct {
	// @required
	Name string `json:"name"`
	// @enum ["query", "header", "path", "cookie"]
	In              string               `json:"in"`
	Description     string               `json:"description,omitempty"`
	Required        bool                 `json:"required,omitempty"`
	Deprecated      bool                 `json:"deprecated,omitempty"`
	AllowEmptyValue bool                 `json:"allowEmptyValue,omitempty"`
	Style           string               `json:"style,omitempty"`
	Explode         bool                 `json:"explode,omitempty"`
	AllowReserved   bool                 `json:"allowReserved,omitempty"`
	Schema          schema.Schema        `json:"schema,omitempty"`
	Content         map[string]MediaType `json:"content,omitempty"`
}

@block "configuration"

func (*Parameter) ParseContextOverride

func (p *Parameter) ParseContextOverride() conflow.ParseContextOverride

type ParameterInterpreter

type ParameterInterpreter struct {
}

ParameterInterpreter is the Conflow interpreter for the Parameter block

func (ParameterInterpreter) CreateBlock

func (i ParameterInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Parameter block

func (ParameterInterpreter) Param

func (i ParameterInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ParameterInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ParameterInterpreter) Schema

func (i ParameterInterpreter) Schema() schema.Schema

func (ParameterInterpreter) SetBlock

func (i ParameterInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ParameterInterpreter) SetParam

func (i ParameterInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ParameterInterpreter) ValueParamName

func (i ParameterInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type PathItem

type PathItem struct {
	Summary     string     `json:"summary,omitempty"`
	Description string     `json:"description,omitempty"`
	Get         *Operation `json:"get,omitempty"`
	Put         *Operation `json:"put,omitempty"`
	Post        *Operation `json:"post,omitempty"`
	Delete      *Operation `json:"delete,omitempty"`
	Options     *Operation `json:"options,omitempty"`
	Head        *Operation `json:"head,omitempty"`
	Patch       *Operation `json:"patch,omitempty"`
	Trace       *Operation `json:"trace,omitempty"`
	// @name "server"
	Servers []*Server `json:"servers,omitempty"`
	// @name "parameter"
	Parameters []*Parameter `json:"parameters,omitempty"`
}

@block "configuration"

func (*PathItem) ParseContextOverride

func (p *PathItem) ParseContextOverride() conflow.ParseContextOverride

type PathItemInterpreter

type PathItemInterpreter struct {
}

PathItemInterpreter is the Conflow interpreter for the PathItem block

func (PathItemInterpreter) CreateBlock

func (i PathItemInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new PathItem block

func (PathItemInterpreter) Param

func (i PathItemInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (PathItemInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (PathItemInterpreter) Schema

func (i PathItemInterpreter) Schema() schema.Schema

func (PathItemInterpreter) SetBlock

func (i PathItemInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (PathItemInterpreter) SetParam

func (i PathItemInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (PathItemInterpreter) ValueParamName

func (i PathItemInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type RequestBody

type RequestBody struct {
	Description string `json:"description,omitempty"`
	// @required
	Content  map[string]*MediaType `json:"content"`
	Required bool                  `json:"required,omitempty"`
}

@block "configuration"

func (*RequestBody) ParseContextOverride

func (r *RequestBody) ParseContextOverride() conflow.ParseContextOverride

type RequestBodyInterpreter

type RequestBodyInterpreter struct {
}

RequestBodyInterpreter is the Conflow interpreter for the RequestBody block

func (RequestBodyInterpreter) CreateBlock

func (i RequestBodyInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new RequestBody block

func (RequestBodyInterpreter) Param

func (i RequestBodyInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (RequestBodyInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (RequestBodyInterpreter) Schema

func (RequestBodyInterpreter) SetBlock

func (i RequestBodyInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (RequestBodyInterpreter) SetParam

func (i RequestBodyInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (RequestBodyInterpreter) ValueParamName

func (i RequestBodyInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Response

type Response struct {
	Description string                `json:"description,omitempty"`
	Content     map[string]*MediaType `json:"content,omitempty"`
}

@block "configuration"

func (*Response) ParseContextOverride

func (r *Response) ParseContextOverride() conflow.ParseContextOverride

type ResponseInterpreter

type ResponseInterpreter struct {
}

ResponseInterpreter is the Conflow interpreter for the Response block

func (ResponseInterpreter) CreateBlock

func (i ResponseInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Response block

func (ResponseInterpreter) Param

func (i ResponseInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ResponseInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ResponseInterpreter) Schema

func (i ResponseInterpreter) Schema() schema.Schema

func (ResponseInterpreter) SetBlock

func (i ResponseInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ResponseInterpreter) SetParam

func (i ResponseInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ResponseInterpreter) ValueParamName

func (i ResponseInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Server

type Server struct {
	URL         url.URL `json:"url"`
	Description string  `json:"description,omitempty"`
	// @name "variable"
	Variables map[string]*ServerVariable `json:"variables,omitempty"`
}

@block "configuration"

func (*Server) MarshalJSON

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

func (*Server) ParseContextOverride

func (s *Server) ParseContextOverride() conflow.ParseContextOverride

type ServerInterpreter

type ServerInterpreter struct {
}

ServerInterpreter is the Conflow interpreter for the Server block

func (ServerInterpreter) CreateBlock

func (i ServerInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Server block

func (ServerInterpreter) Param

func (i ServerInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ServerInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ServerInterpreter) Schema

func (i ServerInterpreter) Schema() schema.Schema

func (ServerInterpreter) SetBlock

func (i ServerInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ServerInterpreter) SetParam

func (i ServerInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ServerInterpreter) ValueParamName

func (i ServerInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type ServerVariable

type ServerVariable struct {
	// @min_items 1
	Enum []string `json:"enum,omitempty"`
	// @required
	Default     string `json:"default"`
	Description string `json:"description,omitempty"`
}

@block "configuration"

type ServerVariableInterpreter

type ServerVariableInterpreter struct {
}

ServerVariableInterpreter is the Conflow interpreter for the ServerVariable block

func (ServerVariableInterpreter) CreateBlock

func (i ServerVariableInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new ServerVariable block

func (ServerVariableInterpreter) Param

func (i ServerVariableInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ServerVariableInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ServerVariableInterpreter) Schema

func (ServerVariableInterpreter) SetBlock

func (i ServerVariableInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ServerVariableInterpreter) SetParam

func (i ServerVariableInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ServerVariableInterpreter) ValueParamName

func (i ServerVariableInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

Jump to

Keyboard shortcuts

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