apiflask
apiflask copied to clipboard
Add `app.etag()` decorator
Something like flask-smorest's bp.etag()
decorator.
I'm interested in your take on this.
I'm not so happy with the implementation in flask-smorest.
It does the job, but it's a bit awkward and perhaps a bit of a simplification. Also it breaks the separation between decorators as it needs information from inside response
that does the dump.
I tried to improve it (https://github.com/marshmallow-code/flask-smorest/tree/rework_etag). I removed a use case that I think is useless. But I couldn't go as far as I wanted and I still have that dependency with response
.
Related SO question: https://stackoverflow.com/questions/70838264/computing-an-etag-for-a-rest-api.
Thanks for the information!
I haven't started thinking about the implementation of this feature yet.
I will revisit it when I try to implement it.
Hello. May I ask a question about the relationship between APIFlask
and flask-smorest
?
The first time I heard about APIFlask is in a podcast greyli being interviewed about Flask 2.0. I was not that excited when I took a look at APIFlask first time, cause I found it not any alternative to FastAPI, just seems like a rewrite of flask-smorest. FastAPI uses type hint, while APIFlask and flask-smorest use decorators.
APIFlask seems more like a successor of flask-smorest and it's still during development. Even the author of smorest participate into this project. Is this true?
I want to implement this function. Are there any good cases that I can refer to? @lafrech @greyli