Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple requestBody examples #192

Open
bobics opened this issue Nov 12, 2018 · 4 comments
Open

Support multiple requestBody examples #192

bobics opened this issue Nov 12, 2018 · 4 comments
Assignees

Comments

@bobics
Copy link

bobics commented Nov 12, 2018

Similar to how multiple response examples are already supported in Widdershins, it would great if it also support multiple requestBody examples.

Here's an example yaml:

   /foo:
    post:
      tags:
        - Foo
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                topic:
                  type: string              
            examples:
              oneRequest:
                description: one
                value:
                  topic: one
              twoRequest:
                description: two
                value:
                  topic: two
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  topic:
                    type: string              
              examples:
                oneResponse:
                  description: one
                  value:
                    topic: one
                twoResponse:
                  description: two
                  value:
                    topic: two

And what it looks like currently:
screen shot 2018-11-12 at 3 17 10 pm

@MikeRalphson MikeRalphson self-assigned this Nov 13, 2018
@badsyntax
Copy link
Contributor

It'd be super useful to have this feature 👍

@sirinn
Copy link

sirinn commented Nov 29, 2020

Hi @MikeRalphson,

I pushed #401 :) Would you have a look ?

@ronan-f
Copy link

ronan-f commented Oct 26, 2022

Hi @MikeRalphson would you accept a PR for this issue? I am planning to continue on the work from @sirinn to get it included.

@ronan-f
Copy link

ronan-f commented Oct 26, 2022

I went ahead and opened a PR. Please let me know what we can do to get this merged #530. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants