Skip to content

How to serialize query object with custom delimeter #2075

Closed
@Mazas17

Description

@Mazas17

I have yaml file:

openapi: 3.0.1
info:
  title: My API
  version: v1
paths:
  # /users;id=3;id=4?metadata=true
  /users:
    get:
      parameters:
        - in: query
          name: offset
          schema:
            type: integer
          description: The number of items to skip before starting to collect the result set
        - in: query
          name: limit
          schema:
            type: integer
          description: The numbers of items to return
        - in: query
          name: origin
          style: form
          explode: false
          schema:
            type: object
            properties:
              city:
                type: string
              zip:
                type: string
      responses:
        '200':
          description: A list of users

When I click "execute", the generated Curl looks like this:
curl -X GET "https://editor.swagger.io/users?offset=2&limit=12&origin=city,atlanta,zip,303" -H "accept: */*"
However, I need it to be like this:
curl -X GET "https://editor.swagger.io/users?offset=2&limit=12&origin=city:atlanta|zip:303" -H "accept: */*"

Is it possible to do this? I could not find any info in documentation about setting custom delimeters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions