Support for requests with JSON objects as query parameters?

Hello,

Does Postman support collections for requests that have objects as query string parameters - specifically collections created from valid OpenAPI 3 specs?

I’m using Postman 10.22.13 on macOS, and have imported a valid OpenAPI 3 spec that includes the following required parameter shown below. It’s a GET query param of type object (location) that must include oneOf the listed properties (zip or address).

When I import this spec into Postman and create a collection from it, it only shows zip as a top-level parameter. When generating a request, zip is included as a top level parameter instead of a nested parameter within the location object.

Thank you.

{
     "schema":
     {
         "type": "object",
         "properties":
         {
             "zip":
             {
                 "type": "string",
                 "description": "Your zip code",
                 "maxLength": 5,
                 "minLength": 5
             },
             "address":
             {
                 "type": "string",
                 "description": "Your address"
             }
         },
         "oneOf":
         [
             {
                 "required":
                 [
                     "zip"
                 ]
             },
             {
                 "required":
                 [
                     "address"
                 ]
             }
         ],
         "maxProperties": 1,
         "minProperties": 1
     },
     "in": "query",
     "name": "location",
     "required": true
 }

Hi @gorbster. Welcome to the Postman Community.

I just tried this and experienced the same. A query in a Postman Collection URL is just an array of key-value(string) pairs.

Our SDK for generating a collection from an OpenAPI definition is Open Source on Github. Can you please raise this as an issue on that repo?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.