ashleysommer / sanic-restplus

Fully featured framework for fast, easy and documented API development with Sanic
http://flask-restplus.readthedocs.org
Other
104 stars 14 forks source link

Requires version_prefix in FutureRoute #26

Closed notzippy closed 3 years ago

notzippy commented 3 years ago

PR https://github.com/sanic-org/sanic/pull/2137 added a new route requirement of version_prefix This patch fixes the API so that it supplies that value if the FutureRoute has the attribute. It is also backwards compatble.

ashleysommer commented 3 years ago

Hi @notzippy Thanks! I don't know how I missed this in my earlier FutureRoute fixes for 21.3 compat (https://github.com/ashleysommer/sanic-restplus/commit/000bb2ff0e56f6d06d374dbe46abe968631f03c8), or why its not failing in my tests. But certainly required.

notzippy commented 3 years ago

A longer term solution would have been to iterate over the list of attributes and set them to none accordingly... But this will fix it for now :-) Sorry I didnt write a unit test that validates this.

ashleysommer commented 3 years ago

Just a note here, for reference. I thought version_prefix was introduced in Sanic 21.3, and I missed it during my compat checks. But thats not the case. version_prefix first appeared in v21.6.0. Sanic-restplus does not yet have support for Sanic v21.6+ (though I'm working on it)

ashleysommer commented 3 years ago

Sanic Restplus v0.6.1 incorporating this fix has been released.