-
Notifications
You must be signed in to change notification settings - Fork 859
Open
Description
Describe the bug
Postman API to Collection generation does not support examples in the objects. The strategies are described here: https://swagger.io/docs/specification/adding-examples/
To Reproduce
Steps to reproduce the behavior:
- Go to "Browse"
- Click on "Create new API" with "Open API 3.0"
- Enter test names and open "Define"
- A sample schema should be present. Replace the schema with
openapi: 3.0.2
info:
title: My API
version: 0.0.0
paths:
'/users/{someOtherString}':
post:
operationId: CreateUser
parameters:
- name: someOtherString
in: path
description: property-two-examples description
required: true
schema:
type: string
examples:
property-example-one:
value: stringOne
property-example-two:
value: stringTwo
- name: someString
in: header
description: Header for XYZ ABC Purposes
required: true
schema:
type: string
examples:
property-example-one:
value: VALUE X
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserRequest'
required: true
responses:
'201':
description: 201 response
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserResponse'
components:
schemas:
CreateUserRequest:
type: object
properties:
firstName:
type: string
lastName:
type: string
required:
- firstName
- lastName
CreateUserResponse:
type: object
properties:
firstName:
type: string
lastName:
type: string
role:
type: string
required:
- firstName
- lastName
- role
- Save
- Click on "Develop"
- Create Documentation
- Open documentation
Expected behavior
The examples request and response should use the example values provided in the specification.
App information (please complete the following information):
App Type: Chrome App
Postman Version: Latest on browser
OS: [e.g. macOS Mojave 10.14.6]