Skip to content

Commit

Permalink
feat: lists HTTP message fields under "field" key
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Validation result now lists validated HTTP message fields under "field" key
  • Loading branch information
artem-zakharchenko committed May 31, 2019
1 parent d581f81 commit bcd5c9e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 31 deletions.
29 changes: 17 additions & 12 deletions features/javascript/request_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,21 @@ Feature: request Sync API
Then it will return:
"""
{ isValid: true,
headers:
{ results: [],
realType: 'application/vnd.apiary.http-headers+json',
expectedType: 'application/vnd.apiary.http-headers+json',
validator: 'HeadersJsonExample',
rawData: { length: 0 } },
body:
{ results: [],
realType: 'text/plain',
expectedType: 'text/plain',
validator: 'TextDiff',
rawData: '' } }
field: {
headers: {
results: [],
realType: 'application/vnd.apiary.http-headers+json',
expectedType: 'application/vnd.apiary.http-headers+json',
validator: 'HeadersJsonExample',
rawData: { length: 0 }
},
body: {
results: [],
realType: 'text/plain',
expectedType: 'text/plain',
validator: 'TextDiff',
rawData: ''
}
},
}
"""
45 changes: 26 additions & 19 deletions features/javascript/response_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,30 @@ Feature: Response Sync API
"""
Then it will return:
"""
{ isValid: true,
headers:
{ results: [],
realType: 'application/vnd.apiary.http-headers+json',
expectedType: 'application/vnd.apiary.http-headers+json',
validator: 'HeadersJsonExample',
rawData: { length: 0 } },
body:
{ results: [],
realType: 'application/json',
expectedType: 'application/json',
validator: 'JsonExample',
rawData: { length: 0 } },
statusCode:
{ realType: 'text/vnd.apiary.status-code',
expectedType: 'text/vnd.apiary.status-code',
validator: 'TextDiff',
rawData: '',
results: [] } }
{
isValid: true,
field: {
headers: {
results: [],
realType: 'application/vnd.apiary.http-headers+json',
expectedType: 'application/vnd.apiary.http-headers+json',
validator: 'HeadersJsonExample',
rawData: { length: 0 }
},
body: {
results: [],
realType: 'application/json',
expectedType: 'application/json',
validator: 'JsonExample',
rawData: { length: 0 }
},
statusCode: {
realType: 'text/vnd.apiary.status-code',
expectedType: 'text/vnd.apiary.status-code',
validator: 'TextDiff',
rawData: '',
results: []
}
}
}
"""

0 comments on commit bcd5c9e

Please sign in to comment.