Skip to content

Instantly share code, notes, and snippets.

@zeke
Created August 10, 2011 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zeke/1135690 to your computer and use it in GitHub Desktop.
Save zeke/1135690 to your computer and use it in GitHub Desktop.
// Sample resource listing
{
"apis":[
{
"path":"/photo",
"description":""
}
],
"basePath":"url",
"swagrVersion":"0.1a",
"apiVersion":"1.0.1a"
}
// Sample operation listing
{
"apis":[
{
"path":"/photo/{userId}",
"description":"",
"operations":[
{
"parameters":[
{
"name":"userId",
"description":"ID of User whose photos",
"dataType":"string",
"allowMultiple":false,
"required":true,
"allowableValues":[
"allowedId1",
"allowedId2",
"allowedId3"
],
"paramType":"path"
}
],
"httpMethod":"GET",
"tags":[
"DM",
"PD"
],
"nickname":"getPhotosById",
"responseClass":"List[photo]",
"deprecated":false,
"open":false,
"summary":"Fetches photos by UserId"
}
],
"errorResponses":[
{
"reason":"Invalid ID supplied",
"code":400
},
{
"reason":"Not Authorized to access User",
"code":403
},
{
"reason":"User not found",
"code":404
}
]
}
],
"models":{
"photo":{
"properties":{
"title":{
"type":"string"
},
"url":{
"type":"string",
"description":"Url for photo",
"access":"restricted",
"notes":"Sample note for a url",
"enum":[
"a",
"b",
"c"
]
}
},
"id":"photo"
}
},
"basePath":"url",
"swagrVersion":"0.1a",
"apiVersion":"1.0.1a"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment