Skip to content

Instantly share code, notes, and snippets.

@maxlinc
Created August 7, 2014 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxlinc/c3a71de07965ae1b0d5a to your computer and use it in GitHub Desktop.
Save maxlinc/c3a71de07965ae1b0d5a to your computer and use it in GitHub Desktop.
Pacto sample
{
"request": {
"headers": {
},
"http_method": "get",
"path": "/api/album/{id}/cover"
},
"response": {
"headers": {
"Content-Type": "application/json"
},
"status": 200,
"schema": {
"$schema": "http://json-schema.org/draft-03/schema#",
"type": "object",
"required": true,
"properties": {
"cover": {
"type": "string",
"required": true
}
}
}
},
"examples": {
"default": {
"request": {
"method": "get",
"uri": "http://localhost:5000/api/album/1/cover",
"headers": {
"User-Agent": "Faraday v0.9.0",
"Accept-Encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"Accept": "*/*"
}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json",
"Content-Length": "17"
},
"body": "{\"cover\":\"image\"}"
}
}
},
"name": "Get Album Cover"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment