openapi-backend icon indicating copy to clipboard operation
openapi-backend copied to clipboard

Lack of Support for Form Explode Serialization in Query Parameters

Open acerola1 opened this issue 6 months ago • 0 comments

In the openapi specification the style: form, explode: true method is the default object serialization. When I define a schema with these, for example:

parameters:
  - in: query
    name: id
    schema:
      type: object
      properties:
        role:
          type: string
        firstName:
          type: string
      style: form
      explode: true

And I call the mock api with the correct serialization: /users?role=admin&firstName=Alex.

I encounter a validation error indicating a missing "id" property, suggesting the library expects the object as a single parameter rather than exploded into individual properties.

Expected Behavior: The library should validate requests with exploded form serialization correctly, recognizing individual properties as part of the specified object parameter.

Is there any solution or workaround for this?

acerola1 avatar Feb 15 '24 15:02 acerola1