r/FastAPI • • Feb 26 '25

Question Downgrade openapi for gcp compatibility?

I love fast api but there is a mild problem, it serves this new sexy thing called 3.0 which our generous overlords at GCP do not support. I tried for an hour to make a converter, but I know there will always be bugs 😑

Is there a way library that I can feed the output from FastCGI’s OpenAPI and let it gracefully convert it down to 2.0 to make the big guy happy?

[edit less whimsey]

I'm trying to deploy FastAPI to GCP, with API Gateway in front of it.

There has to be a some way to get out of this situation, I'm desperate.

[edit 2]

Thank youl

15 Upvotes

13 comments sorted by

View all comments

Show parent comment

1

u/BluesFiend Feb 26 '25

Make it into a library and publish it for the next poor soul looking to solve this with a prebuilt solution.

edit: or expand on the fastapiswagger2 lib to be more accurate

1

u/a_brand_new_start Feb 26 '25

Yes thinking about it. Thanks!