shared_parameters_yaml

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_yaml (Fixture 4) witnesses that the swagger:operation wholesale-YAML path runs the same shared-namespace checks: a $ref into #/parameters or #/responses is validated, and a dangling ref raises a diagnostic.

See .claude/plans/features/shared-parameters-fixtures.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpA

func OpA()

OpA references the shared namespace from wholesale YAML; both refs resolve and are kept.

swagger:operation GET /a opA

--- summary: resolving refs parameters:

  • $ref: '#/parameters/X-Request-ID'

responses:

default:
  $ref: '#/responses/ErrorResponse'

func OpB

func OpB()

OpB references names that do not exist in the shared namespace; each raises a dangling-ref diagnostic.

swagger:operation GET /b opB

--- summary: dangling refs parameters:

  • $ref: '#/parameters/DoesNotExist'

responses:

default:
  $ref: '#/responses/Missing'

Types

type CommonHeaders

type CommonHeaders struct {
	// in: header
	RequestID string `json:"X-Request-ID"`
}

CommonHeaders registers #/parameters/X-Request-ID.

swagger:parameters *

type ErrorResponse

type ErrorResponse struct {
	// in: body
	Body struct {
		// Message is a human-readable error message.
		Message string `json:"message"`
	} `json:"body"`
}

ErrorResponse registers #/responses/ErrorResponse.

swagger:response *

Jump to

Keyboard shortcuts

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