fastapi-versioning icon indicating copy to clipboard operation
fastapi-versioning copied to clipboard

Versioning in headers

Open olaf7 opened this issue 4 years ago • 2 comments

This website: https://restfulapi.net/ is a nice write up to discuss REST API with references to Fielding's dissertation. They also have a page on versioning where a paragraph on URI versioning suggests to use headers instead of URIs. It would be nice if fastapi-versioning would support this. See: https://restfulapi.net/versioning/

olaf7 avatar Jul 05 '21 12:07 olaf7

I also want to do this! I.e. pass a version=2020-01-01 header and have the application route to a different endpoint, even if that has to be on a different URL internally, thats fine. As long as the external-facing URL is without a version.

dirkbrnd avatar Sep 20 '21 12:09 dirkbrnd

Posted something on a FastAPI issue here to showcase how it could be done: https://github.com/tiangolo/fastapi/issues/3910#issuecomment-1024132161

HHK1 avatar Jan 28 '22 11:01 HHK1