Created
September 17, 2013 04:58
-
-
Save GUI/6590215 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
{ | |
"apiVersion":"1.0.0", | |
"swaggerVersion":"1.2", | |
"basePath":"http://petstore.swagger.wordnik.com/api", | |
"resourcePath":"/pet", | |
"produces":[ | |
"application/json", | |
"application/xml", | |
"text/plain", | |
"text/html" | |
], | |
"apis":[ | |
{ | |
"path":"/pet/{petId}", | |
"operations":[ | |
{ | |
"method":"GET", | |
"summary":"Find pet by ID", | |
"notes":"Returns a pet based on ID", | |
"type":"Pet", | |
"nickname":"getPetById", | |
"parameters":[ | |
{ | |
"name":"petId", | |
"description":"ID of pet that needs to be fetched", | |
"required":true, | |
"type":"integer", | |
"format":"int64", | |
"paramType":"path", | |
"minimum":"1.0", | |
"maximum":"100000.0" | |
} | |
], | |
"responseMessages":[ | |
{ | |
"code":400, | |
"message":"Invalid ID supplied" | |
}, | |
{ | |
"code":404, | |
"message":"Pet not found" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"path":"/pet/findByStatus", | |
"operations":[ | |
{ | |
"method":"GET", | |
"summary":"Finds Pets by status", | |
"notes":"Multiple status values can be provided with comma seperated strings", | |
"type":"array", | |
"items":{ | |
"$ref":"Pet" | |
}, | |
"nickname":"findPetsByStatus", | |
"parameters":[ | |
{ | |
"name":"status", | |
"description":"Status values that need to be considered for filter", | |
"defaultValue":"available", | |
"required":true, | |
"type":"string", | |
"paramType":"query", | |
"enum":[ | |
"available", | |
"pending", | |
"sold" | |
] | |
} | |
], | |
"responseMessages":[ | |
{ | |
"code":400, | |
"message":"Invalid status value" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"path":"/pet/findByTags", | |
"operations":[ | |
{ | |
"method":"GET", | |
"summary":"Finds Pets by tags", | |
"notes":"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", | |
"type":"array", | |
"items":{ | |
"$ref":"Pet" | |
}, | |
"nickname":"findPetsByTags", | |
"parameters":[ | |
{ | |
"name":"tags", | |
"description":"Tags to filter by", | |
"required":true, | |
"type":"string", | |
"paramType":"query" | |
} | |
], | |
"responseMessages":[ | |
{ | |
"code":400, | |
"message":"Invalid tag value" | |
} | |
], | |
"deprecated":"true" | |
} | |
] | |
} | |
], | |
"models":{ | |
"Tag":{ | |
"id":"Tag", | |
"properties":{ | |
"id":{ | |
"type":"integer", | |
"format":"int64", | |
"description":"Unique identifier for the tag" | |
}, | |
"name":{ | |
"type":"string", | |
"description":"Friendly name for the tag" | |
} | |
} | |
}, | |
"Pet":{ | |
"id":"Pet", | |
"required":[ | |
"id", | |
"name" | |
], | |
"properties":{ | |
"id":{ | |
"type":"integer", | |
"format":"int64", | |
"description":"Unique identifier for the Pet", | |
"minimum":"0.0", | |
"maximum":"100.0" | |
}, | |
"category":{ | |
"$ref":"Category", | |
"description":"Category the pet is in" | |
}, | |
"name":{ | |
"type":"string", | |
"description":"Friendly name of the pet" | |
}, | |
"photoUrls":{ | |
"type":"array", | |
"description":"Image URLs", | |
"items":{ | |
"type":"string" | |
} | |
}, | |
"tags":{ | |
"type":"array", | |
"description":"Tags assigned to this pet", | |
"items":{ | |
"$ref":"Tag" | |
} | |
}, | |
"status":{ | |
"type":"string", | |
"description":"pet status in the store", | |
"enum":[ | |
"available", | |
"pending", | |
"sold" | |
] | |
} | |
} | |
}, | |
"Category":{ | |
"id":"Category", | |
"properties":{ | |
"id":{ | |
"type":"integer", | |
"format":"int64", | |
"description":"Category unique identifier", | |
"minimum":"0.0", | |
"maximum":"100.0" | |
}, | |
"name":{ | |
"type":"string", | |
"description":"Name of the category", | |
"minimum":"0.0", | |
"maximum":"100.0" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment