Skip to content

Nested object schema validation in query params #83

@hendrikheil

Description

@hendrikheil

Given my understanding of JSON schema and OpenAPI (3.1) the following schema is supposed to be valid:

paths:
  /path:
    get:
      parameters:
        - name: obj
          in: query
          style: deepObject
          schema:
            type: object
            properties:
              root:
                type: string
              nested:
                type: object
                properties:
                  child:
                    type: string
          required: true

Meaning an URL like /path?obj[root]=test1&obj[nested][child]=test2 should pass the validation against the schema above.

As far as I can tell from the code deepObject style query parameters are decoded to a flat map of QueryParam arrays. This works for objects with a depth of one, but won't work for objects with more depth.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions