bug2922

package
v0.36.3 Latest Latest
Warning

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

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

Documentation

Overview

Package bug2922 reproduces go-swagger issue #2922 ("enum description: superfluous name&values"): the enum const-name mapping (e.g. "FIRST TestEnumFirst") is appended to the property description AND duplicated in x-go-enum-desc. The reporter finds the description pollution superfluous.

The mapping is folded in at every affected target — both a schema property (in: body) and a non-body parameter (in: query) — so the SkipEnumDescriptions knob is exercised across both the schema and parameters builders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnumTest

func GetEnumTest()

swagger:route GET /enum/test things GetEnumTest

responses:

200: GetEnumTestResponse

Types

type EnumHeaderResponse

type EnumHeaderResponse struct {
	// The description of the enum header
	// in: header
	TestEnumInHeader TestEnum `json:"X-Test-Enum"`
}

EnumHeaderResponse carries an enum-typed response header.

swagger:response enumHeaderResponse

type GetEnumTestResponse

type GetEnumTestResponse struct {
	// The description of the test enum in the response body
	TestEnumInBody TestEnum `json:"testEnumInBody"`
}

swagger:model GetEnumTestResponse

type GetTestEnumParam

type GetTestEnumParam struct {
	// The description of the test enum param
	// in: query
	TestEnumInQueryParam TestEnum `json:"testEnumInQueryParam"`
}

swagger:parameters GetEnumTest

type TestEnum

type TestEnum string

swagger:enum TestEnum

const (
	TestEnumFirst  TestEnum = "FIRST"
	TestEnumSecond TestEnum = "SECOND"
)

Jump to

Keyboard shortcuts

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