(definitionName string, document openapi3.T, operation openapi3.Operation)
| 309 | } |
| 310 | |
| 311 | func (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 | |
| 322 | func (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) |
no test coverage detected