(method string, route string, category *OperationCategory, operation openapi3.Operation)
| 88 | } |
| 89 | |
| 90 | func (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 | |
| 106 | func (p OpenApiParser) getSchemaType(schema openapi3.Schema) string { |
| 107 | if schema.Type.Is(openapi3.TypeArray) { |
no test coverage detected