openapi-generators/openapi-python-client

Using dictionary in query param

siddhsql opened this issue · 0 comments

Describe the bug
I have an endpoint that takes in a dictionary as a query param:

- name: metadata
          in: query
          required: false
          style: deepObject
          explode: true
          schema:
            type: object
            additionalProperties:
              type: string

note this:

          style: deepObject
          explode: true

The openapi generator generates same code whether I have

          style: deepObject
          explode: true

present or not. I am using version 0.19.1.

The URL generated is like:

http://localhost:8080/foo?author=Joshua%20Bloch&publisher=Pearson%20Addison-Wesley

When

          style: deepObject
          explode: true

is present, the URL should be like:

http://localhost:8080/foo?metadata[author]=Joshua%20Bloch&metadata[publisher]=Pearson%20Addison-Wesley

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

OpenAPI Spec File
see above

Desktop (please complete the following information):

  • OS: [e.g. macOS 10.15.1] macOS ventura (13)
  • Python Version: [e.g. 3.8.0]
  • openapi-python-client version [e.g. 0.1.0] 0.19.0

Additional context
Add any other context about the problem here.