Skip to content

How to write multiple examples in response body? #837

@Hao1995

Description

@Hao1995

Scribe version

4.35.0

Your question

I want to add multiple examples to the response bodies. It is mentioned by swagger doc.

responses:
  '200':
    description: A user object.
    content:
      application/json:
        schema:
          $ref: '#/components/schemas/User'   # Reference to an object
        examples:
          Jessica:
            value:
              id: 10
              name: Jessica Smith
          Ron:
            value:
              id: 20
              name: Ron Stewart

Does it work on scribe?

Docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions