Skip to content

Importing Multi-example response #89

@Br41n

Description

@Br41n

when i try to import a multi-example response, is only importing the first response.

OPENAPI 3.0.0 EXAMPLE

openapi: "3.0.0"

info:
  title: ExampleApi
  description: Example Api
  version: 1.0.0
  contact:
    name: support
    email: [email protected]

servers:
  - url: http://example.com
    description: example server

paths:
  /users:
    post:
      description: Create User
      summary: Create User
      responses:
        '201':  
          description: Return a User Object
          content: 
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
              examples:
                John-Ok-Example:
                  summary: Success create of John User
                  description: Success create of John User
                  value:
                    id: 1
                    name: John Doe
                Jane-Ok-Example:
                  summary: Success create of Jane User
                  description: Success create of Jane User
                  value:
                    id: 2
                    name: Jane Doe

Postman Versión

image

Postman Collection

image

Postman Example

image

Referencia

See: /lib/utils.js
function getExampleData

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions