go-swagger: github.com/go-swagger/go-swagger/fixtures/goparsing/petstore/models Index | Files

package models

import "github.com/go-swagger/go-swagger/fixtures/goparsing/petstore/models"

Index

Package Files

order.go pet.go tag.go user.go

type Order Uses

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 Uses

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 Uses

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 Uses

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

Package models imports 2 packages (graph) and is imported by 9 packages. Updated 2018-05-04. Refresh now. Tools for package owners.