(components *openapi3.Components, doFn func(RefWrapper) (bool, error))
| 58 | } |
| 59 | |
| 60 | func walkComponents(components *openapi3.Components, doFn func(RefWrapper) (bool, error)) error { |
| 61 | // Not a valid ref, ignore it and continue |
| 62 | if components == nil { |
| 63 | return nil |
| 64 | } |
| 65 | |
| 66 | for _, schema := range components.Schemas { |
| 67 | _ = walkSchemaRef(schema, doFn) |
| 68 | } |
| 69 | |
| 70 | for _, param := range components.Parameters { |
| 71 | _ = walkParameterRef(param, doFn) |
| 72 | } |
| 73 | |
| 74 | for _, header := range components.Headers { |
| 75 | _ = walkHeaderRef(header, doFn) |
| 76 | } |
| 77 | |
| 78 | for _, requestBody := range components.RequestBodies { |
| 79 | _ = walkRequestBodyRef(requestBody, doFn) |
| 80 | } |
| 81 | |
| 82 | for _, response := range components.Responses { |
| 83 | _ = walkResponseRef(response, doFn) |
| 84 | } |
| 85 | |
| 86 | for _, securityScheme := range components.SecuritySchemes { |
| 87 | _ = walkSecuritySchemeRef(securityScheme, doFn) |
| 88 | } |
| 89 | |
| 90 | for _, example := range components.Examples { |
| 91 | _ = walkExampleRef(example, doFn) |
| 92 | } |
| 93 | |
| 94 | for _, link := range components.Links { |
| 95 | _ = walkLinkRef(link, doFn) |
| 96 | } |
| 97 | |
| 98 | for _, callback := range components.Callbacks { |
| 99 | _ = walkCallbackRef(callback, doFn) |
| 100 | } |
| 101 | |
| 102 | return nil |
| 103 | } |
| 104 | |
| 105 | func walkSchemaRef(ref *openapi3.SchemaRef, doFn func(RefWrapper) (bool, error)) error { |
| 106 | // Not a valid ref, ignore it and continue |
no test coverage detected