bug3214

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 bug3214 reproduces go-swagger issue #3214: a struct field that references a named primitive type whose doc comment carries both prose and an inline `enum:` annotation.

The historical bug: the referenced typed primitive was only parsed for title/description and the `enum:` declaration line was wrongly swallowed into the description rather than parsed into enum values. The expected behaviour — locked by the golden — is that the enum values are parsed and the prose is preserved untouched (no `enum:` text leaking into title or description).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

type Currency string

Currency is the billing currency of an order.

It is rendered as an ISO-4217 alphabetic code. This second prose paragraph proves that a full description paragraph survives intact and that the annotation declaration line below is not folded into it.

enum: ["USD","EUR","JPY"]

type Order

type Order struct {
	// The current state of the order.
	State State `json:"state"`

	// The currency the order is billed in.
	Currency Currency `json:"currency"`
}

Order references typed primitives.

swagger:model Order

type State

type State string

State represents the state of an order. enum: ["created","processed"]

Jump to

Keyboard shortcuts

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