openapi: Render all responses of an operation.

Previously, one needed to specifying all the HTTP status
codes that we want to render along with the operation,
but the primary use case just needs the responses of
all the status codes, and not just one.

This commit modifies the Markdown extension to render
all the responses of all status codes of a specified
operation in a loop.
This commit is contained in:
Suyash Vardhan Mathur
2021-07-13 21:03:43 +05:30
committed by GitHub
parent db7d2ee713
commit 981e4f8946
8 changed files with 44 additions and 59 deletions

View File

@@ -182,12 +182,11 @@ must have a `post` HTTP method defined.
If you've already followed the steps in the [Usage examples](#usage-examples)
section, this part should be fairly trivial.
You can use the following Markdown directive to render the fixtures
defined in the OpenAPI `zulip.yaml` for a given endpoint and status
code:
You can use the following Markdown directive to render all the fixtures
defined in the OpenAPI `zulip.yaml` for a given endpoint
```
{generate_code_example|/messages/render:post|fixture(200)}
{generate_code_example|/messages/render:post|fixture}
```
## Step by step guide