mschae / trailing_format_plug

An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json
25 stars 15 forks source link

strip format from parameter #13

Closed msmykowski closed 7 years ago

msmykowski commented 7 years ago

In the case where the last item in the path_info is a parameter, we would want to strip the format type off of this parameter.

e.g. /api/:sport

When requesting /api/:hockey.json, we would want to sport parameter to be "hockey" and not "hockey.json".

mschae commented 7 years ago

Thanks, I release v0.0.6 with this change!