Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query parameter exploded object serialization #569

Open
LeweyM opened this issue May 12, 2023 · 0 comments
Open

Query parameter exploded object serialization #569

LeweyM opened this issue May 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@LeweyM
Copy link

LeweyM commented May 12, 2023

Hey,

The OpenAPI specs outline a way to serialize exploded object query parameters. This means that with a spec like the following:

query-parameters -> {shape: "square", color: "red"}

parameters:
  - in: query
    name: query-parameters
    schema:
      type: object
      properties:
          shape:
            type: string
          color:
            type: string
    style: form
    explode: true

You should be able to make requests like so: request?shape=square&color=red

With explode=true and style=form, the library should deserialise this to an object like {shape: "square", color: "red"}

This currently isn't supported by openapi-backend. Is this intentional?

If not, I'd be happy to make a PR.
Great library btw ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants