cowboy_swagger
cowboy_swagger copied to clipboard
Verify that for each path each cowboy binding has a correspondingly named parameter
E.g. a cowboy binding :id
must have a corresponding Swagger parameter named id
.
Current behaviour is that such constraint is not enforced hence cowboy_swagger generates /api-docs/swagger.json
for UI accessible at /api-docs
with path that may contain bindings with no corresponding parameter, hence causing curly variable template to be sent to server.
Example: trail with cowboy binding called :id
and swagger parameter named key
causes this Swagger UI...
... that when clicking Try it out!
sends to server something like /places/{id}
- i.e. with no replaced value:
2017-03-09 13:15:16.503 [info] <0.942.0> PUT /places/%7Bid%7D
Tentatively assigning this to myself. Can't guarantee I'll look at it in the near future, but this way it'll be on my "radar".
I bumped into this today. I want to have a route like /users/:user_id/[queries/:query_id]
where the optional part is not acceptable for a PUT operation. The way it is the request is getting sent as /users/<user_id>/queries/{query_id}
, since I have no input to fill in.
I bumped into this today. I want to have a route like
/users/:user_id/[queries/:query_id]
where the optional part is not acceptable for a PUT operation. The way it is the request is getting sent as/users/<user_id>/queries/{query_id}
, since I have no input to fill in.
Hm... probably not the same issue, since I can have different trails for different routes. Oh, well...