moko-network icon indicating copy to clipboard operation
moko-network copied to clipboard

Support square bracket params

Open alllohaaa opened this issue 3 years ago • 0 comments

need to support square bracket query params with OpenAPI 3.0 style: deepObject and explode: true spec

query example https://api.example.com/profiles/list?position[lat]=37.1&position[lng]=-122.1

yaml example

openapi: 3.0.0
...

paths:
  /info:
    get:
      parameters:
        - in: query
          name: sort
          schema:
            type: object
            properties:
              name:
                type: integer
                example: 1
              age:
                type: integer
                example: -1
          style: deepObject
          explode: true
      responses:
        '200':
          description: OK

spec https://swagger.io/docs/specification/serialization/

alllohaaa avatar Dec 01 '21 16:12 alllohaaa