Documentation
¶
Overview ¶
Package shared_parameters_prune (Fixture 6) witnesses the prune extension (C4) of the shared-parameters feature (go-swagger#2632): shared parameters/responses referenced by no operation are pruned under PruneUnusedModels, and retained without it.
The integration test scans this package twice — with ScanModels only (all four shared objects present) and with ScanModels + PruneUnusedModels (the unused pair pruned) — mirroring coverage_prune_unused_test.go.
See .claude/plans/features/shared-parameters-fixtures.md (§6b).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UnusedHeader ¶
type UnusedHeader struct {
// in: header
Unused string `json:"X-Unused"`
}
UnusedHeader registers #/parameters/X-Unused and is referenced by no operation → pruned under PruneUnusedModels.
swagger:parameters *
type UnusedResponse ¶
type UnusedResponse struct {
// in: body
Body struct {
// unused detail.
Detail string `json:"detail"`
} `json:"body"`
}
UnusedResponse is referenced by no operation → pruned under PruneUnusedModels.
swagger:response *
type UsedHeader ¶
type UsedHeader struct {
// in: header
Used string `json:"X-Used"`
}
UsedHeader registers #/parameters/X-Used and is referenced by listP → it survives pruning.
swagger:parameters *
type UsedResponse ¶
type UsedResponse struct {
// in: body
Body struct {
// OK message.
Message string `json:"message"`
} `json:"body"`
}
UsedResponse is referenced by listP's Responses block → survives.
swagger:response *