defaults_examples

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 defaults_examples exercises default and example tag parsing across numeric, array and object schema types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// Ratio is a float32 value.
	//
	// default: 1.5
	// example: 2.25
	Ratio float32 `json:"ratio"`

	// Weight is a float64 value.
	//
	// default: 3.14
	// example: 9.81
	Weight float64 `json:"weight"`

	// Tags is a slice with a JSON-array default and example.
	//
	// default: ["a","b"]
	// example: ["x","y","z"]
	Tags []string `json:"tags"`

	// Counts is a slice of integers with a JSON-array default.
	//
	// default: [1,2,3]
	// example: [4,5]
	Counts []int `json:"counts"`

	// Props is a map represented as a JSON object.
	//
	// default: {"k":1}
	// example: {"q":42,"r":7}
	Props map[string]int `json:"props"`
}

Metrics aggregates fields that carry default and example tags for the numeric, array and object branches of parseValueFromSchema.

swagger:model

Jump to

Keyboard shortcuts

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