DeanWay / fastapi-versioning

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

Support dependency overrides on the versioned app #33

Open pshen-rp opened 3 years ago

pshen-rp commented 3 years ago

I ran into this issue, https://github.com/DeanWay/fastapi-versioning/issues/19, and made an easy fix so clients can add the dependency overrides directly to the VersionedFastAPI. However, it doesn't work if they overwrite the dependency overrides altogether like so:

app = VersionedFastAPI(app)
app.dependency_overrides = {dependency: lambda: "patched"}
MarvinSchenkel commented 2 years ago

Is there any way we can get this PR merged? I would love to be able to use this out of the box

leo-shao07 commented 5 months ago

@DeanWay can you please merge this, thanks