bug2251

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

This section is empty.

Types

type M

type M struct {
	// string key — the green guard rail (already emits additionalProperties).
	StrKey map[string]int `json:"strKey"`
	// int key — valid JSON, must emit additionalProperties (#2251).
	IntKey map[int]int `json:"intKey"`
	// named int64 key — likewise.
	I64Key map[int64]int `json:"i64Key"`
	// float key — encoding/json rejects it; must NOT emit additionalProperties
	// and must raise a diagnostic instead of dropping silently (§18 fail-loud).
	BadKey map[float64]int `json:"badKey"`
}

M probes map key types (go-swagger#2251). encoding/json marshals integer-kind keys as JSON string keys, so they ARE representable as additionalProperties — codescan currently drops them (only string / TextMarshaler keys are emitted).

swagger:model

Jump to

Keyboard shortcuts

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