MCPcopy Create free account
hub / github.com/UiPath/uipathcli / getOperationName

Method getOperationName

parser/openapi_parser.go:90–104  ·  view source on GitHub ↗
(method string, route string, category *OperationCategory, operation openapi3.Operation)

Source from the content-addressed store, hash-verified

88}
89
90func (p OpenApiParser) getOperationName(method string, route string, category *OperationCategory, operation openapi3.Operation) string {
91 name := method + route
92 customName := p.getCustomName(operation.Extensions)
93 if customName != "" {
94 return customName
95 }
96 if operation.OperationID != "" {
97 name = operation.OperationID
98 }
99 name = toSnakeCase(name)
100 if category != nil {
101 name = strings.TrimPrefix(name, category.Name+"-")
102 }
103 return name
104}
105
106func (p OpenApiParser) getSchemaType(schema openapi3.Schema) string {
107 if schema.Type.Is(openapi3.TypeArray) {

Callers 1

parseOperationMethod · 0.95

Calls 2

getCustomNameMethod · 0.95
toSnakeCaseFunction · 0.85

Tested by

no test coverage detected