Help us shape the future of Go! Take the 2026 Go Developer Survey

petstore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package petstore provides generated types for the Petstore API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOpenAPISpecJSON

func GetOpenAPISpecJSON() ([]byte, error)

GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.

Types

type Error

type Error struct {
	// Error code
	Code int32 `form:"code" json:"code"`
	// Error message
	Message string `form:"message" json:"message"`
}

#/components/schemas/Error

func (*Error) ApplyDefaults

func (s *Error) ApplyDefaults()

ApplyDefaults sets default values for fields that are nil.

type FindPetsJSONResponse

type FindPetsJSONResponse = []Pet

#/paths//pets/get/responses/200/content/application/json/schema

type NewPet

type NewPet struct {
	// Name of the pet
	Name string `form:"name" json:"name"`
	// Type of the pet
	Tag *string `form:"tag,omitempty" json:"tag,omitempty"`
}

#/components/schemas/NewPet

func (*NewPet) ApplyDefaults

func (s *NewPet) ApplyDefaults()

ApplyDefaults sets default values for fields that are nil.

type Pet

type Pet struct {
	// Name of the pet
	Name string `form:"name" json:"name"`
	// Type of the pet
	Tag *string `form:"tag,omitempty" json:"tag,omitempty"`
	// Unique id of the pet
	ID int64 `form:"id" json:"id"`
}

#/components/schemas/Pet

func (*Pet) ApplyDefaults

func (s *Pet) ApplyDefaults()

ApplyDefaults sets default values for fields that are nil.

Directories

Path Synopsis
validator command

Jump to

Keyboard shortcuts

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