DeanWay / fastapi-versioning

api versioning for fastapi web applications
MIT License
650 stars 63 forks source link

app decorators not working #26

Open danielbregler opened 3 years ago

danielbregler commented 3 years ago

Hi,

first of all thank you for this essential extension to FastAPI ! I have a problem that might be to the lack of a functional example only. I can not get any of the decorators to work together with extending the original app with VersionedFastAPI

@app.on_event("startup") @repeat_every

the code is structured like in your example, where VersionedFastAPI(app) is the last line after all the endpoints:

app = FastAPI() ... some endpoints... app = VersionedFastAPI(app)

Thank you very much for your help