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

Function pruneUnusedComponents

pkg/codegen/prune.go:473–481  ·  view source on GitHub ↗
(swagger *openapi3.T)

Source from the content-addressed store, hash-verified

471}
472
473func pruneUnusedComponents(swagger *openapi3.T) {
474 for {
475 refs := findComponentRefs(swagger)
476 countRemoved := removeOrphanedComponents(swagger, refs)
477 if countRemoved < 1 {
478 break
479 }
480 }
481}

Callers 4

TestFilterOnlyCatFunction · 0.85
TestFilterOnlyDogFunction · 0.85
GenerateFunction · 0.85

Calls 2

findComponentRefsFunction · 0.85
removeOrphanedComponentsFunction · 0.85

Tested by 3

TestFilterOnlyCatFunction · 0.68
TestFilterOnlyDogFunction · 0.68