parser

package
v1.0.36 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParameterTypeString       = "string"
	ParameterTypeBinary       = "binary"
	ParameterTypeInteger      = "integer"
	ParameterTypeNumber       = "number"
	ParameterTypeBoolean      = "boolean"
	ParameterTypeObject       = "object"
	ParameterTypeStringArray  = "stringArray"
	ParameterTypeIntegerArray = "integerArray"
	ParameterTypeNumberArray  = "numberArray"
	ParameterTypeBooleanArray = "booleanArray"
	ParameterTypeObjectArray  = "objectArray"
)
View Source
const (
	ParameterInPath   = "path"
	ParameterInQuery  = "query"
	ParameterInHeader = "header"
	ParameterInBody   = "body"
	ParameterInForm   = "form"
)
View Source
const CustomParameterNameExtension = "x-name"
View Source
const DefaultServerBaseUrl = "https://cloud.uipath.com"
View Source
const RawBodyParameterName = "$input"

Variables

This section is empty.

Functions

func ToSnakeCase

func ToSnakeCase(str string) string

Types

type Definition

type Definition struct {
	Name        string
	Description string
	Operations  []Operation
}

func NewDefinition

func NewDefinition(name string, description string, operations []Operation) *Definition

type OpenApiParser

type OpenApiParser struct{}

func (OpenApiParser) Parse

func (p OpenApiParser) Parse(name string, data []byte) (*Definition, error)

type Operation

type Operation struct {
	Name        string
	Summary     string
	Description string
	Method      string
	BaseUri     url.URL
	Route       string
	ContentType string
	Parameters  []Parameter
	Plugin      plugin.CommandPlugin
	Hidden      bool
	Category    *OperationCategory
}

func NewOperation

func NewOperation(name string, summary string, description string, method string, baseUri url.URL, route string, contentType string, parameters []Parameter, plugin plugin.CommandPlugin, hidden bool, category *OperationCategory) *Operation

type OperationCategory added in v1.0.26

type OperationCategory struct {
	Name        string
	Description string
}

func NewOperationCategory added in v1.0.26

func NewOperationCategory(name string, description string) *OperationCategory

type Parameter

type Parameter struct {
	Name          string
	Type          string
	Description   string
	In            string
	FieldName     string
	Required      bool
	DefaultValue  interface{}
	AllowedValues []interface{}
	Parameters    []Parameter
}

func NewParameter

func NewParameter(name string, t string, description string, in string, fieldName string, required bool, defaultValue interface{}, allowedValues []interface{}, parameters []Parameter) *Parameter

type Parser

type Parser interface {
	Parse(name string, data []byte) (*Definition, error)
}

Jump to

Keyboard shortcuts

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