Skip to content

Is there support for deep Object in query params #250

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

Open
Origin1227 opened this issue May 25, 2020 · 2 comments
Open

Is there support for deep Object in query params #250

Origin1227 opened this issue May 25, 2020 · 2 comments
Labels
area/deserializing Indicates an issue on deserializing area. kind/missing-implementation

Comments

@Origin1227
Copy link

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

@sarangsbabu367
Copy link

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.

@p1c2u p1c2u added area/deserializing Indicates an issue on deserializing area. kind/missing-implementation labels Jul 20, 2020
@p1c2u
Copy link
Collaborator

p1c2u commented Jul 20, 2020

@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.

@Yarn-e Yarn-e mentioned this issue Nov 16, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deserializing Indicates an issue on deserializing area. kind/missing-implementation
Projects
None yet
Development

No branches or pull requests

3 participants