bug3005

package
v0.36.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package bug3005 covers go-swagger issue #3005 ("additionalProperties are lost when generating spec from code"): a model wants named properties AND additionalProperties. The reporter carried the latter on a json:"-" map field, which is muted; the resolution is the explicit type-level marker `swagger:additionalProperties <spec>`, which restates the value type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestAdditionalProperties

type TestAdditionalProperties struct {
	// field1
	Field1 string `json:"field1,omitempty"`

	// The map that motivated #3005 stays muted (json:"-"); the marker above
	// supplies the additionalProperties schema.
	TestAdditionalProperties map[string]float64 `json:"-"`
}

TestAdditionalProperties has a named property plus free-form number values.

swagger:model TestAdditionalProperties swagger:additionalProperties number

Jump to

Keyboard shortcuts

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