shared_parameters_prune

package
v0.36.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

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

func ListP

func ListP()

ListP references the used shared parameter and the used shared response; the unused pair is left dangling for the prune pass.

swagger:route GET /p prune listP swagger:parameters listP X-Used Responses:

default: UsedResponse

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 *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL