(path string, item *openapi3.PathItem)
| 66 | ) |
| 67 | |
| 68 | func genAPIs(path string, item *openapi3.PathItem) ([]*API, error) { |
| 69 | apis := make([]*API, 0, 8) |
| 70 | for _, method := range validMethods { |
| 71 | opt := item.GetOperation(method) |
| 72 | if opt == nil { |
| 73 | continue |
| 74 | } |
| 75 | api, err := genAPI(method, path, opt, item.Parameters) |
| 76 | if err != nil { |
| 77 | return nil, err |
| 78 | } |
| 79 | apis = append(apis, api) |
| 80 | } |
| 81 | return apis, nil |
| 82 | } |
| 83 | |
| 84 | func genAPI(method string, path string, opt *openapi3.Operation, params openapi3.Parameters) (*API, error) { |
| 85 | api := &API{ |
no test coverage detected