Skip to content

Commit

Permalink
Merge pull request #9 from Pchelolo/swagger_router
Browse files Browse the repository at this point in the history
v0.1.4. Updated swagger-router and tests
  • Loading branch information
Marko Obrovac committed Feb 16, 2016
2 parents 62641c0 + 1c727f2 commit e2c6191
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "hyperswitch",
"version": "0.1.3",
"version": "0.1.4",
"description": "REST API creation framework",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -31,7 +31,7 @@
"jsonwebtoken": "^5.5.4",
"cassandra-uuid": "^0.0.2",
"preq": "^0.4.8",
"swagger-router": "^0.3.4",
"swagger-router": "^0.4.0",
"swagger-ui": "git+https://github.com/wikimedia/swagger-ui#master",
"json-stable-stringify": "git+https://github.com/wikimedia/json-stable-stringify#master",
"ajv": "^3.4.0"
Expand Down
34 changes: 17 additions & 17 deletions test/handlerTemplate/test_config.yaml
Expand Up @@ -24,8 +24,8 @@ spec_root: &spec_root
headers:
'content-type': 'application/json'
body:
res1: '{$.get_from_api1.body}'
res2: '{$.get_from_api2.body}'
res1: '{{get_from_api1.body}}'
res2: '{{get_from_api2.body}}'
x-monitor: false
/service/return_if_test/{title}:
get:
Expand All @@ -40,18 +40,18 @@ spec_root: &spec_root
- 404
- '3xx'
return:
status: '{$.get_from_api.status}'
status: '{{get_from_api.status}}'
headers:
'content-type': '{$.get_from_api.headers.content-type}'
body: '{$.get_from_api.body}'
'content-type': '{{get_from_api.headers.content-type}}'
body: '{{get_from_api.body}}'
- repeat_request:
request:
uri: http://mocked_domain_for_tests.com/{title}
return:
status: '{$.repeat_request.status}'
status: '{{repeat_request.status}}'
headers:
'content-type': '{$.repeat_request.headers.content-type}'
body: '{$.repeat_request.body}'
'content-type': '{{repeat_request.headers.content-type}}'
body: '{{repeat_request.body}}'
x-monitor: false

/service/simple_catch/{title}:
Expand All @@ -65,18 +65,18 @@ spec_root: &spec_root
catch:
status: 404
return:
status: '{$.get_from_api.status}'
status: '{{get_from_api.status}}'
headers:
'content-type': '{$.get_from_api.headers.content-type}'
body: '{$.get_from_api.body}'
'content-type': '{{get_from_api.headers.content-type}}'
body: '{{get_from_api.body}}'
- repeat_request:
request:
uri: http://mocked_domain_for_tests.com/{title}
return:
status: '{$.repeat_request.status}'
status: '{{repeat_request.status}}'
headers:
'content-type': '{$.repeat_request.headers.content-type}'
body: '{$.repeat_request.body}'
'content-type': '{{repeat_request.headers.content-type}}'
body: '{{repeat_request.body}}'
x-monitor: false

/service/non_status_catch/{title}:
Expand All @@ -89,10 +89,10 @@ spec_root: &spec_root
body:
test: 'test'
return:
status: '{$.get_from_api.status}'
status: '{{get_from_api.status}}'
headers:
'content-type': '{$.get_from_api.headers.content-type}'
body: '{$.get_from_api.body}'
'content-type': '{{get_from_api.headers.content-type}}'
body: '{{get_from_api.body}}'
x-monitor: false

/service/setup_test:
Expand Down

0 comments on commit e2c6191

Please sign in to comment.