-
-
Notifications
You must be signed in to change notification settings - Fork 133
[Bug]: Can’t validate integer
/number
/boolean
from application/x-www-form-urlencoded
request body
#700
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
Comments
Hi @andersk thanks for your report. Yes, this requires one more change in casting process. I will release it shortly. |
I've the same issue, but using a different mimetype /Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/deserializing/media_types/deserializers.py:24: UserWarning: Unsupported application/problem+json mimetype
warnings.warn(f"Unsupported {self.mimetype} mimetype")
Traceback (most recent call last):
File "/Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/validation/decorators.py", line 31, in wrapper
return f(*args, **kwds)
File "/Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/validation/request/validators.py", line 253, in _get_body
return self._get_content_value(raw_body, mimetype, content)
File "/Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/unmarshalling/unmarshallers.py", line 113, in _get_content_value
return self._unmarshal_schema(schema, casted)
File "/Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/unmarshalling/unmarshallers.py", line 90, in _unmarshal_schema
return unmarshaller.unmarshal(value)
File "/Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py", line 282, in unmarshal
self.schema_validator.validate(value)
File "/Users/raul/.pyenv/versions/3.7.17/lib/python3.7/site-packages/openapi_core/validation/schemas/validators.py", line 41, in validate
raise InvalidSchemaValue(value, schema_type, schema_errors=errors)
openapi_core.validation.schemas.exceptions.InvalidSchemaValue: Value foo=123 not valid for schema of type object: (<ValidationError: "'foo=123' is not of type 'object'">,) The allowed mime types from what i can see in the code are |
@lRaulMN7 That’s not the same issue—before even getting to the |
Thanks @andersk , you guided me to the solution! I had to use |
Actual Behavior
Expected Behavior
No error.
Steps to Reproduce
OpenAPI Core Version
0.18.1 or current Git (cc95ed0)
OpenAPI Core Integration
none
Affected Area(s)
No response
References
No response
Anything else we need to know?
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: