bug1726

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 bug1726 covers go-swagger#1726: markdown-style bullet lists (`* item`, `+ item`) must be identified as lists exactly like the YAML-style dash form (`- item`), everywhere the annotation language recognises a list. The lexer normalises `*`/`+` bullets to the canonical `- `, so both prose descriptions and value lists (consumes/produces/…) treat them identically.

This fixture intentionally uses `*` and `+` bullets and is therefore NOT gofmt-clean: gofmt rewrites markdown bullets in doc comments to `-`. That is exactly the point — the scanner must normalise non-gofmt'd source the same way gofmt would, so the two forms agree. (fixtures/ is excluded from the gofmt formatters in .golangci.yml.)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListWidgets

func ListWidgets()

ListWidgets exercises the value-list path (Produces/Consumes go through Property.AsList): markdown bullets there must be recognised as list items too, proving the relaxation propagates beyond prose descriptions.

swagger:route GET /widgets widgets listWidgets

List widgets.

Produces:

  • application/json
  • application/xml

Consumes:

  • application/json

    Responses: 200: description: ok

Types

type Gadget

type Gadget struct {
	// kind of gadget
	Kind string `json:"kind"`
}

Gadget uses asterisk bullets — the reporter's exact form. The leading `* ` markers must survive as a list (normalised to `- `), not be stripped as godoc decoration into a run-on line.

Features:

  • fast
  • cheap

swagger:model

type Gizmo

type Gizmo struct {
	// kind of gizmo
	Kind string `json:"kind"`
}

Gizmo uses plus bullets, the third CommonMark bullet marker.

Traits:

  • light
  • sturdy

swagger:model

type Widget

type Widget struct {
	// The colour.
	//
	// Allowed values:
	//   - red
	//   - green
	//   - blue
	Colour string `json:"colour"`
}

Widget uses the dash bullet form, the green guard rail that already worked.

The widget supports:

  • red
  • green
  • blue

swagger:model

Jump to

Keyboard shortcuts

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