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

Method getCategory

parser/openapi_parser.go:311–320  ·  view source on GitHub ↗
(definitionName string, document openapi3.T, operation openapi3.Operation)

Source from the content-addressed store, hash-verified

309}
310
311func (p OpenApiParser) getCategory(definitionName string, document openapi3.T, operation openapi3.Operation) *OperationCategory {
312 if len(operation.Tags) > 0 {
313 name := operation.Tags[0]
314 tag := document.Tags.Get(name)
315 formattedName := toSnakeCase(name)
316 summary, description := p.getCategoryText(definitionName, formattedName, tag)
317 return NewOperationCategory(formattedName, summary, description)
318 }
319 return nil
320}
321
322func (p OpenApiParser) parseOperation(definitionName string, document openapi3.T, method string, baseUri url.URL, route string, operation openapi3.Operation, routeParameters openapi3.Parameters) Operation {
323 category := p.getCategory(definitionName, document, operation)

Callers 1

parseOperationMethod · 0.95

Calls 4

getCategoryTextMethod · 0.95
toSnakeCaseFunction · 0.85
NewOperationCategoryFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected