Created
April 1, 2016 23:14
-
-
Save nati/3ef08372717aaf0ae70e64175dcd4079 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
swagger: "2.0" | |
info: | |
version: "0.1" | |
title: "gohan API" | |
basePath: "/" | |
schemes: | |
- "http" | |
consumes: | |
- "application/json" | |
produces: | |
- "application/json" | |
paths: | |
/v1.0/store/pets: | |
get: | |
description: "Get list of pet resources" | |
produces: | |
- "application/json" | |
responses: | |
200: | |
description: "" | |
schema: | |
type: "array" | |
items: | |
$ref: "#/definitions/pet" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
post: | |
description: "Create new pet resource" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "pet" | |
in: "body" | |
description: "pet reosurce input" | |
required: true | |
schema: | |
$ref: "#/definitions/petInput" | |
responses: | |
201: | |
description: "pet created" | |
schema: | |
$ref: "#/definitions/pet" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
/v1.0/store/pets/{id}: | |
get: | |
description: "Show a pet resources" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "id" | |
in: "path" | |
description: "ID of pet to fetch" | |
required: true | |
type: "string" | |
responses: | |
200: | |
description: "" | |
schema: | |
$ref: "#/definitions/pet" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
put: | |
description: "Update pet resource" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "id" | |
in: "path" | |
description: "ID of pet to update" | |
required: true | |
type: "string" | |
- | |
name: "pet" | |
in: "body" | |
description: "pet reosurce input" | |
required: true | |
schema: | |
$ref: "#/definitions/petUpdate" | |
responses: | |
200: | |
description: "pet created" | |
schema: | |
$ref: "#/definitions/pet" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
delete: | |
description: "Delete a pet resources" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "id" | |
in: "path" | |
description: "ID of pet to fetch" | |
required: true | |
type: "string" | |
responses: | |
204: | |
description: "pet get deleted" | |
schema: | |
$ref: "#/definitions/pet" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
/v1.0/store/orders: | |
get: | |
description: "Get list of order resources" | |
produces: | |
- "application/json" | |
responses: | |
200: | |
description: "" | |
schema: | |
type: "array" | |
items: | |
$ref: "#/definitions/order" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
post: | |
description: "Create new order resource" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "order" | |
in: "body" | |
description: "order reosurce input" | |
required: true | |
schema: | |
$ref: "#/definitions/orderInput" | |
responses: | |
201: | |
description: "order created" | |
schema: | |
$ref: "#/definitions/order" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
/v1.0/store/orders/{id}: | |
get: | |
description: "Show a order resources" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "id" | |
in: "path" | |
description: "ID of order to fetch" | |
required: true | |
type: "string" | |
responses: | |
200: | |
description: "" | |
schema: | |
$ref: "#/definitions/order" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
put: | |
description: "Update order resource" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "id" | |
in: "path" | |
description: "ID of order to update" | |
required: true | |
type: "string" | |
- | |
name: "order" | |
in: "body" | |
description: "order reosurce input" | |
required: true | |
schema: | |
$ref: "#/definitions/orderUpdate" | |
responses: | |
200: | |
description: "order created" | |
schema: | |
$ref: "#/definitions/order" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
delete: | |
description: "Delete a order resources" | |
produces: | |
- "application/json" | |
parameters: | |
- | |
name: "id" | |
in: "path" | |
description: "ID of order to fetch" | |
required: true | |
type: "string" | |
responses: | |
204: | |
description: "order get deleted" | |
schema: | |
$ref: "#/definitions/order" | |
default: | |
description: "unexpected error" | |
schema: | |
$ref: "#/definitions/errorModel" | |
definitions: | |
base: | |
properties: | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
id: | |
description: "ID" | |
title: "ID" | |
type: "string" | |
view: | |
- "detail" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
tenant_id: | |
description: "Tenant ID" | |
title: "Tenant ID" | |
type: "string" | |
view: | |
- "detail" | |
required: [] | |
type: "object" | |
baseInput: null | |
baseUpdate: null | |
pet: | |
properties: | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
id: | |
description: "ID" | |
title: "ID" | |
type: "string" | |
view: | |
- "detail" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
status: | |
description: "Status" | |
enum: | |
- "available" | |
- "pending" | |
- "sold" | |
title: "Status" | |
type: "string" | |
tenant_id: | |
description: "Tenant ID" | |
title: "Tenant ID" | |
type: "string" | |
view: | |
- "detail" | |
type: "object" | |
petInput: | |
additionalProperties: false | |
properties: | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
id: | |
description: "ID" | |
title: "ID" | |
type: "string" | |
view: | |
- "detail" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
status: | |
description: "Status" | |
enum: | |
- "available" | |
- "pending" | |
- "sold" | |
title: "Status" | |
type: "string" | |
tenant_id: | |
description: "Tenant ID" | |
title: "Tenant ID" | |
type: "string" | |
view: | |
- "detail" | |
type: "object" | |
petUpdate: | |
additionalProperties: false | |
properties: | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
status: | |
description: "Status" | |
enum: | |
- "available" | |
- "pending" | |
- "sold" | |
title: "Status" | |
type: "string" | |
type: "object" | |
order: | |
properties: | |
complete: | |
description: "Complete" | |
title: "Complete" | |
type: "boolean" | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
id: | |
description: "ID" | |
title: "ID" | |
type: "string" | |
view: | |
- "detail" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
pet_id: | |
description: "Pet" | |
title: "Pet" | |
type: "string" | |
status: | |
description: "Status" | |
enum: | |
- "placed" | |
- "approved" | |
- "delivered" | |
title: "Status" | |
type: "string" | |
tenant_id: | |
description: "Tenant ID" | |
title: "Tenant ID" | |
type: "string" | |
view: | |
- "detail" | |
type: "object" | |
orderInput: | |
additionalProperties: false | |
properties: | |
complete: | |
description: "Complete" | |
title: "Complete" | |
type: "boolean" | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
id: | |
description: "ID" | |
title: "ID" | |
type: "string" | |
view: | |
- "detail" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
pet_id: | |
description: "Pet" | |
title: "Pet" | |
type: "string" | |
status: | |
description: "Status" | |
enum: | |
- "placed" | |
- "approved" | |
- "delivered" | |
title: "Status" | |
type: "string" | |
tenant_id: | |
description: "Tenant ID" | |
title: "Tenant ID" | |
type: "string" | |
view: | |
- "detail" | |
type: "object" | |
orderUpdate: | |
additionalProperties: false | |
properties: | |
description: | |
description: "Description" | |
title: "Description" | |
type: "string" | |
name: | |
description: "Name" | |
title: "Name" | |
type: "string" | |
status: | |
description: "Status" | |
enum: | |
- "placed" | |
- "approved" | |
- "delivered" | |
title: "Status" | |
type: "string" | |
type: "object" | |
errorModel: | |
type: "object" | |
properties: | |
error: | |
description: "error message" | |
title: "error" | |
type: "string" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment