nested

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 0 Imported by: 8

Documentation

Overview

Package nested contains sample nested types used to exercise schema generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamedPets added in v0.5.0

type NamedPets map[string]*Pet

NamedPets is a map of animal names to pets.

type Pet

type Pet struct {
	// Name of the animal.
	Name string `json:"name" jsonschema:"title=Name"`
}

Pet defines the user's fury friend.

type Pets added in v0.5.0

type Pets []*Pet

Pets is a collection of Pet objects.

type Plant

type Plant struct {
	Variant string `json:"variant" jsonschema:"title=Variant"` // This comment will be used
	// Multicellular is true if the plant is multicellular
	Multicellular bool `json:"multicellular,omitempty" jsonschema:"title=Multicellular"` // This comment will be ignored
}

Plant represents the plants the user might have and serves as a test of structs inside a `type` set.

Jump to

Keyboard shortcuts

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