bug1088

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Things

func Things()

Things uses the arrayReq parameters and the arrayResp headers.

swagger:route GET /things things arrayReq

List things.

Responses:
  200: arrayResp

Types

type ArrayHeaders

type ArrayHeaders struct {
	// in: header
	XTags []Label `json:"X-Tags"`

	// in: header
	XObjs []Ele `json:"X-Objs"`
}

ArrayHeaders carries response headers. A response header is a Swagger 2.0 simple schema too, so array-of-object headers are subject to the same constraint as query parameters (go-swagger#1088).

swagger:response arrayResp

type Ele

type Ele struct {
	SomeID   int    `json:"someId"`
	SomeName string `json:"someName"`
}

Ele is an object element.

type Label

type Label string

Label is a named primitive (underlying string).

type Request

type Request struct {
	// in: query
	Tags []Label `json:"tags"`

	// in: query
	Arr []Ele `json:"arr"`
}

Request declares array query parameters. An array IS valid in a query parameter, but the items form a Swagger 2.0 *simple schema* — it may not be a $ref. The scanner used to emit `items: {$ref}` (invalid; the editor rejects it). The $ref must dissolve: a named primitive expands to its type (Label -> string); an object element has no valid simple-schema form, so it dissolves to an empty items schema with a diagnostic.

swagger:parameters arrayReq

Jump to

Keyboard shortcuts

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