api docs: Migrate POST /messages/render to OpenAPI.

This commit is contained in:
Yago González
2018-06-18 19:29:12 +02:00
committed by Tim Abbott
parent 57c2d8c72a
commit 7c50f6cdd4
5 changed files with 36 additions and 19 deletions

View File

@@ -284,8 +284,7 @@ def render_message(client):
result = client.render_message(request)
# {code_example|end}
fixture = FIXTURES['render-message']
test_against_fixture(result, fixture)
validate_against_openapi_schema(result, '/messages/render', 'post', '200')
def send_message(client):
# type: (Client) -> int
@@ -492,7 +491,7 @@ def test_invalid_stream_error(client):
validate_against_openapi_schema(result, '/get_stream_id', 'get', '400')
TEST_FUNCTIONS = {
'render-message': render_message,
'/messages/render:post': render_message,
'/messages:post': send_message,
'/messages/{message_id}:patch': update_message,
'/get_stream_id:get': get_stream_id,