I am currently trying to import an OpenAPI 3.0.3 specification into Postman and I am facing an issue with the way the query parameters are imported when they are defined as a JSON object.
In my OpenAPI file, I have the following instructions:
parameters:
- in: query
name: range
content:
application/json:
schema:
$ref: "#/components/schemas/RangeCriteria"
example: "{ \"from\": 0, \"to\": 20 }"
#example:
# from: 0
# to: 20
description: Allows implementing a pagination mechanism
components:
schemas:
RangeCriteria:
type: object
properties:
from:
type: integer
format: int32
to:
type: integer
format: int32
But after importing the file into Postman (version 8.10.0), the parameter is imported without any value
I tried several methods to define the parameter (specify exemple as string, as an object, at both parameter or schema level), but I was not able to get the expected result (I also tried using both Postman import advance settings for request parameters i.e. Schema or Example). The idea is to get the following definition of the query parameter:
range={"from": 0, "to": 20}
Is there something incorrect in the way I defined the parameter (it appears correctly using Swagger UI) ? Is the content
property for parameters
items not supported by Postman ?
Thanks for your help