Skip to content
Snippets Groups Projects
Commit ad1ab19d authored by Adriano Cori's avatar Adriano Cori
Browse files

updated service descriptions for tests

parent db809f1b
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ class HttpClientTest extends UnitTestCase {
$this->assertInternalType('array', $result);
$this->assertGreaterThan(1, count($result));
$result = $this->client->findPosts(['postId' => 1]);
$result = $this->client->findPost(['postId' => 1]);
$this->assertNotEmpty($result);
$this->assertInternalType('array', $result);
$this->assertArrayHasKey('id', $result);
......@@ -183,6 +183,7 @@ class HttpClientTest extends UnitTestCase {
*/
public function providerTestGetCommand() {
return [
['FindPost'],
['FindPosts'],
['FindComments'],
];
......
{
"operations": {
"FindPosts": {
"httpMethod": "GET",
"uri": "posts",
"summary": "Find posts",
"responseClass": "FindPostsOutput"
},
"FindPost": {
"httpMethod": "GET",
"uri": "posts/{postId}",
"summary": "Find posts",
"responseClass": "Post",
"parameters": {
"postId": {
"location": "uri",
"description": "Filter posts by id",
"required": false,
"required": true,
"type": "string"
}
}
......@@ -27,5 +34,34 @@
}
}
},
"models": {}
"models": {
"Post": {
"type": "object",
"properties": {
"userId": {
"location": "json",
"type": "integer"
},
"id": {
"location": "json",
"type": "integer"
},
"title": {
"location": "json",
"type": "string"
},
"body": {
"location": "json",
"type": "string"
}
}
},
"FindPostsOutput": {
"location": "json",
"type": "array",
"items": {
"$ref": "Post"
}
}
}
}
......@@ -2,7 +2,7 @@
"name": "TestApi",
"apiVersion": "2016-07-29",
"description": "Client wrapper for the TestApi API.",
"includes" : [
"imports" : [
"items/posts.json"
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment