Skip to content

Is there support for deep Object in query params #250

Open

Description

@Origin1227

Does openapi-core provide support for deep Object in query params
Below i have my schema specifying parameters

    parameters
       [
          {
            "name": "abcd",
            "in": "query",
            "description": "Parameters",
            "explode": false,
            "style": "deepObject",
            "schema": {
              "type": "object",
              "properties": {
                "a": {
                  "type": "number"
                },
                "b": {
                  "type": "number"
                }
              }
            }
          }
        ]

example:
according to this
urls of the type /fruits?abcd[a]=1 should be accepted
and urls of type /fruits?abcd=1 should throw error

Activity

  1. sarangsbabu367 commented on Jul 9, 2020

    @sarangsbabu367

    Related to this issue, Can we validate properties in deepObject schema, I tried with additionalProperties: false. But it wasnt validated. Any value can be given inside deebObject query-param.

  2. p1c2u commented on Jul 20, 2020

    @p1c2u
    Collaborator

    @sarangsbabu367

    Hi, there is no deepObject support at the moment.

    https://github.com/p1c2u/openapi-core/blob/0aeb14477bd881247856a8ab520b5adf4223573d/openapi_core/deserializing/parameters/factories.py#L11

    Future implementation should validate schema agains schema in schema field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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