examples

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: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package examples contains sample types used to exercise schema generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	// Unique sequential identifier.
	ID int `json:"id" jsonschema:"required"`
	// This comment will be ignored
	Name    string         `` /* 153-byte string literal not displayed */
	Friends []int          `json:"friends,omitempty" jsonschema_description:"list of IDs, omitted when empty"`
	Tags    map[string]any `json:"tags,omitempty"`

	// An array of pets the user cares for.
	Pets nested.Pets `json:"pets"`

	// Set of animal names to pets
	NamedPets nested.NamedPets `json:"named_pets"`

	// Set of plants that the user likes
	Plants []*nested.Plant `json:"plants" jsonschema:"title=Plants"`
}

User is used as a base to provide tests for comments. Don't forget to checkout the nested path.

Directories

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

Jump to

Keyboard shortcuts

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