You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
Thanks for reporting the issue. According to the OAS3 support status (it's still very experimental) the type should be already supported. I wonder whether the OAS3 adapter already correctly generates the schemas for Dredd in this case. @kylef would you be so nice and check where the problem could be? If there is something we don't support yet, I think there would be a warning about it 🤔
Validation of response body is done from an example value in content. Therefore you should include an example to get response body validation
That said, we have an update coming out soon (https://github.com/apiaryio/api-elements.js/blob/4139afabdc50750380afbe65bf2d01f41ec4466b/packages/fury-adapter-oas3-parser/CHANGELOG.md) which contains more support for examples (referencing Example Object) and inferring an example from a schema (provding the schema is not a reference at the moment). Producing a schema is planned, but this won't happen until our schema parser is improved somewhat. I don't think it's worth us targetting old JSON Schema specs and I think we should go straight for draft-07 (or draft-08 depending on when that comes out) so it will also be worth thinking about making Dredd compatible with the newer versions of JSON Schema.
I have an OpenAPI v3 specification file with the following (showing just fragments):
but the server response is:
Note the name property type is
integer
and in the server response, it is astring
(on purpose) butdredd
request passes (success).Doesn't
dredd
check for response property types?I redefined the response as
string
(not JSON):and
dredd
doesn't complain about either.I even changed the property of the schema:
And same (success) result when it is expected to fail.
Aren't these validation supported by
dredd
? Am I using specification wrong?To Reproduce
dredd
Expected behavior
Request fail.
What is in your
dredd.yml
?What's your
dredd --version
output?Does
dredd --loglevel=debug
uncover something?No
Can you send us failing test in a Pull Request?
Yes
The text was updated successfully, but these errors were encountered: