petstore

package
v0.18.0 Latest Latest
Warning

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

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

Documentation

Overview

Package petstore API

The purpose of this application is to provie an application that is using plain go to define an API.

This should demonstrate many comment annotations that are available to turn go code into a fully compliant swagger 2.0 spec

Terms Of Service:

there are no TOS at this moment, use at your own risk we take no responsibility

Schemes: http
Host: petstore.swagger.wordnik.com
BasePath: /api
Version: 1.0.0
License: MIT http://opensource.org/licenses/MIT
Contact: John Doe<john.doe@example.com> http://john.doe.com

Consumes:
- application/json

Produces:
- application/json

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeAPI

func ServeAPI(host, basePath string, schemes []string) (err error)

ServeAPI serves the API for this record store

Types

type ErrorModel

type ErrorModel struct {
	// the code for this error
	// required: true
	Code int32 `json:"code"`
	// the message for this error
	// required: true
	Message string `json:"message"`
}

ErrorModel represents a generic error in this application

An error will typically return this model.

The code and message of the error, both get returned.

swagger:model errorModel

type NewPet

type NewPet struct {
	// the name for this pet
	// required: true
	Name string `json:"name"`
}

NewPet represents a new pet within this application

A new pet is preferable a puppy.

swagger:model newPet

type Pet

type Pet struct {
	// swager:allOf
	NewPet
	// the id for this pet
	// required: true
	Identifier int64 `json:"id"`
}

Pet represents a pet within this application

A pet is preferable cute and fluffy.

Examples of typical pets are dogs and cats.

swagger:model pet

Jump to

Keyboard shortcuts

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