Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Add method validation for requests #158

Closed
artem-zakharchenko opened this issue May 13, 2019 · 3 comments · Fixed by #178
Closed

Add method validation for requests #158

artem-zakharchenko opened this issue May 13, 2019 · 3 comments · Fixed by #178

Comments

@artem-zakharchenko
Copy link
Contributor

I suggest to consider adding method field validation of requests.

Why

At the moment we don't validate the method field (at least explicitly). Migrating toward more readable validation result Object that is being evolved with validation results of each field, it appears that explicit method validation would be beneficial.

How

  1. Add the method field on validateRequest function.
  2. Use strings comparison for validation.
@honzajavorek
Copy link
Contributor

This is probably because Gavel is driven by the needs in Dredd and Apiary Mock/Proxy Server, where it's basically impossible to get mismatch in method. But it makes sense, from a more general point of view.

Ideally, we would describe the behavior using the .feature files first and then implement it.

@artem-zakharchenko
Copy link
Contributor Author

The behavior of this feature will be described in gavel-spec and once released, implemented in gavel.

@ApiaryBot
Copy link
Collaborator

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants