(ref *openapi3.LinkRef, doFn func(RefWrapper) (bool, error))
| 330 | } |
| 331 | |
| 332 | func walkLinkRef(ref *openapi3.LinkRef, doFn func(RefWrapper) (bool, error)) error { |
| 333 | // Not a valid ref, ignore it and continue |
| 334 | if ref == nil { |
| 335 | return nil |
| 336 | } |
| 337 | refWrapper := RefWrapper{Ref: ref.Ref, HasValue: ref.Value != nil, SourceRef: ref} |
| 338 | shouldContinue, err := doFn(refWrapper) |
| 339 | if err != nil { |
| 340 | return err |
| 341 | } |
| 342 | if !shouldContinue { |
| 343 | return nil |
| 344 | } |
| 345 | if ref.Value == nil { |
| 346 | return nil |
| 347 | } |
| 348 | |
| 349 | return nil |
| 350 | } |
| 351 | |
| 352 | func walkExampleRef(ref *openapi3.ExampleRef, doFn func(RefWrapper) (bool, error)) error { |
| 353 | // Not a valid ref, ignore it and continue |
no outgoing calls
no test coverage detected