bug2804

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 bug2804 reproduces go-swagger issue #2804 ("Should swagger:parameters support map[string][]string?"): a map-typed swagger:parameters field crashes the scan with a nil-pointer dereference in parameterBuilder.buildFromField (Schema.Typed on a nil schema), rather than producing a parameter or a diagnostic. A map is not representable as an OAS2 simple (query/formData) parameter.

The same rule applies to the other OAS2 SimpleSchema target — response headers: a map-typed (non-body) response field has no SimpleSchema representation and must be skipped with a diagnostic rather than silently corrupting the response body schema.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	// in: query
	PropertyFilters map[string][]string `json:"property_filters"`
}

swagger:parameters doQuery

type Resp

type Resp struct {
	// in: header
	Filters map[string][]string `json:"X-Filters"`
}

Resp is a response carrying a map-typed header field, which is not representable as an OAS2 SimpleSchema header.

swagger:response doQueryResponse

Jump to

Keyboard shortcuts

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