parser

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 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 DefaultServerBaseUrl = "https://cloud.uipath.com"

Variables

This section is empty.

Functions

func ToSnakeCase

func ToSnakeCase(str string) string

Types

type Definition

type Definition struct {
	Name        string
	BaseUri     url.URL
	Description string
	Operations  []Operation
}

func NewDefinition

func NewDefinition(name string, baseUri url.URL, 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
	Description string
	Method      string
	Route       string
	Parameters  []Parameter
	Plugin      plugin.CommandPlugin
	Hidden      bool
}

func NewOperation

func NewOperation(name string, description string, method string, route string, parameters []Parameter, plugin plugin.CommandPlugin, hidden bool) *Operation

type Parameter

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

func NewParameter

func NewParameter(name string, t string, description string, in string, fieldName string, required bool, defaultValue 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