question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dredd skips transaction if there's no value for URI template's parameter

See original GitHub issue

If “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.

@netmilk @smizell

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jackbentleycommented, Mar 28, 2017

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.

0reactions
honzajavorekcommented, Dec 8, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found