Skip to content

Query Parameters Serialization - Explode don't respect the default value. #479

@nicolastakashi

Description

@nicolastakashi

When the style: form is present in the specification and explode not, the default value is being treated as false instead of true.

Using the example below:

openapi: 3.0.1
info:
  title: 'Tests v1'
  version: v1
paths:
  '/tests':
    get:
      tags:
        - Test
      summary: 'Test'
      description: |-
        Test Operation
      operationId: GetAsync
      parameters:
        - name: test
          description: "test description"
          in: query
          style: form
          schema:
            type: array
            items:
              type: integer
              format: int32
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: string

I just looked around the code and I could see that the object is assuming the default value for a boolean property in .NET

One thing that could be done is to force the default value to be true, what do you think about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions