models

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	// the ID of the order
	//
	// required: true
	ID int64 `json:"id"`

	// the id of the user who placed the order.
	//
	// required: true
	UserID int64 `json:"userId"`

	// the time at which this order was made.
	//
	// required: true
	OrderedAt strfmt.DateTime `json:"orderedAt"`

	// the items for this order
	// mininum items: 1
	Items []struct {

		// the id of the pet to order
		//
		// required: true
		PetID int64 `json:"petId"`

		// the quantity of this pet to order
		//
		// required: true
		// minimum: 1
		Quantity int32 `json:"qty"`
	} `json:"items"`
}

An Order for one or more pets by a user. swagger:model order

type Pet

type Pet struct {
	// The id of the pet.
	//
	// required: true
	ID int64 `json:"id"`

	// The name of the pet.
	//
	// required: true
	// pattern: \w[\w-]+
	// minimum length: 3
	// maximum length: 50
	Name string `json:"name"`

	// The photo urls for the pet.
	// This only accepts jpeg or png images.
	//
	// items pattern: \.(jpe?g|png)$
	PhotoURLs []string `json:"photoUrls,omitempty"`

	// The current status of the pet in the store.
	Status string `json:"status,omitempty"`

	// Extra bits of information attached to this pet.
	//
	Tags []Tag `json:"tags,omitempty"`

	// The pet's birthday
	//
	// swagger:strfmt date
	Birthday time.Time `json:"birthday"`
}

A Pet is the main product in the store. It is used to describe the animals available in the store.

swagger:model pet

type Tag

type Tag struct {
	// The id of the tag.
	//
	// required: true
	ID int64 `json:"id"`

	// The value of the tag.
	//
	// required: true
	Value string `json:"value"`
}

A Tag is an extra piece of data to provide more information about a pet. It is used to describe the animals available in the store. swagger:model tag

type User

type User struct {
	// The id of the user.
	//
	// required: true
	ID int64 `json:"id"`

	// The name of the user.
	//
	// required: true
	Name string `json:"name"`
}

A User can purchase pets swagger:model user

Jump to

Keyboard shortcuts

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