Documentation ¶
Overview ¶
Package parser parses OpenAPI specifications, extracts all the information needed to create the CLI commands and parameters.
Index ¶
Constants ¶
const ( ParameterTypeString = "string" ParameterTypeBinary = "binary" ParameterTypeInteger = "integer" ParameterTypeNumber = "number" ParameterTypeBoolean = "boolean" ParameterTypeObject = "object" ParameterTypeStringArray = "stringArray" ParameterTypeIntegerArray = "integerArray" ParameterTypeNumberArray = "numberArray" ParameterTypeBooleanArray = "booleanArray" ParameterTypeObjectArray = "objectArray" )
const ( ParameterInPath = "path" ParameterInQuery = "query" ParameterInHeader = "header" ParameterInBody = "body" ParameterInForm = "form" ParameterInCustom = "custom" )
const CustomNameExtension = "x-uipathcli-name"
const DefaultServerBaseUrl = "https://cloud.uipath.com"
const RawBodyParameterName = "$file"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
The Definition provides the high-level information about all operations of the service
func NewDefinition ¶
func NewDefinition(name string, description string, operations []Operation) *Definition
type OpenApiParser ¶
type OpenApiParser struct{}
The OpenApiParser parses OpenAPI (2.x and 3.x) specifications. It creates the Definition structure with all the information about the available operations and their parameters for the given service specification.
func NewOpenApiParser ¶ added in v1.0.57
func NewOpenApiParser() *OpenApiParser
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 }
The Operation is the definition of a route which can be called by the CLI.
It holds all the information needed to make the call, like HTTP method, Route, Parameters, etc...
type OperationCategory ¶ added in v1.0.26
OperationCategory allows grouping multiple operations under a common resource.
func NewOperationCategory ¶ added in v1.0.26
func NewOperationCategory(name string, description string) *OperationCategory