Dredd skips transaction if there's no value for URI template's parameter
See original GitHub issueIf “Ambigous URI parameter” happens (there’s URI template with parameter, but the parameter isn’t described anywhere), Dredd warns about it and just seems to skip the transaction in v1.0.x
version.
Note: In
v1.1.0-pre.x
versions this behavior is broken (https://github.com/apiaryio/dredd/issues/469, https://github.com/apiaryio/dredd/issues/478), but this issue is about the fact that I think even the original approach isn’t completely correct.
Should Dredd skip the transaction or fail? I think it would be better if:
- For URI template parameters such as
/people/{id}/address
the “Ambigous URI parameter” annotation should be an error and Dredd should end with that error. - For URI template parameters such as
/people{?sort}
the “Ambigous URI parameter” annotation should be a warning and Dredd should test with URI created without the parameter.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How It Works — Dredd latest documentation
Compile HTTP transactions from API description documents. Inherit headers. Inherit parameters. Expand URI templates with parameters. Load hooks. Test run.
Read more >RFC 6570: URI Template
(form-style parameters) will not omit the "=" when the value is empty. Multiple variables and list values have their values joined with ","...
Read more >Dredd Release latest Apiary - Dredd testing framework
Dredd, Release latest URI Parameters Both API Blueprint and OpenAPI 2 allow usage of ... If Dredd isn't able to infer any value...
Read more >Definición de un ecosistema de herramientas Open Source y ...
there's not only the need to coordinate team members but there's an aditional ... Path - Used together with Path Templating, where the...
Read more >Untitled
#kishida Stoney burke southern company, After mt st helens eruption, Peter tosh no nuclear war amazon, Mz restauration leipzig. Superaventura club super 3 ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has already caught me out. I had an endpoint that was returning an incorrect status code, and dredd had silently skipped the test, as the route had URI parameters specified for another method.
@lteacher Hello! Thanks for getting here. This is not resolved and I agree with you this can lead into flawed trust into how Dredd is able to test your contract, which is a fundamentally the reason why Dredd exists in the first place. This needs a bit more analysis though on how we want to approach and execute this. I’ll get some opinion from @netmilk and get back here.