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