Validate response headers based on specified header

Add validate_headers step in response validator.
Using JSON::Validator with validate header value with swagger header 
object.
This commit is contained in:
vinhbachsy
2016-10-18 21:45:55 +08:00
parent 10dd37896f
commit 5cf376891a
5 changed files with 79 additions and 1 deletions

View File

@@ -89,8 +89,26 @@
"responses": {
"200": {
"description": "blog found",
"headers": {
"ETag": {
"type": "string"
},
"Last-Modified": {
"type": "string"
},
"Cache-Control": {
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/blog"
},
"examples": {
"application/json": {
"id": 1,
"title": "Hello world!",
"content": "Hello world and hello universe. Thank you all very much!!!"
}
}
},
"404": {