MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / walkSecuritySchemeRef

Function walkSecuritySchemeRef

pkg/codegen/prune.go:310–330  ·  view source on GitHub ↗
(ref *openapi3.SecuritySchemeRef, doFn func(RefWrapper) (bool, error))

Source from the content-addressed store, hash-verified

308}
309
310func walkSecuritySchemeRef(ref *openapi3.SecuritySchemeRef, doFn func(RefWrapper) (bool, error)) error {
311 // Not a valid ref, ignore it and continue
312 if ref == nil {
313 return nil
314 }
315 refWrapper := RefWrapper{Ref: ref.Ref, HasValue: ref.Value != nil, SourceRef: ref}
316 shouldContinue, err := doFn(refWrapper)
317 if err != nil {
318 return err
319 }
320 if !shouldContinue {
321 return nil
322 }
323 if ref.Value == nil {
324 return nil
325 }
326
327 // NOTE: `SecuritySchemeRef`s don't contain any children that can contain refs
328
329 return nil
330}
331
332func walkLinkRef(ref *openapi3.LinkRef, doFn func(RefWrapper) (bool, error)) error {
333 // Not a valid ref, ignore it and continue

Callers 1

walkComponentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected