Failed to fetch localhost OpenAPI spec

Can you share you code for your fix? I’m building a FastAPI plugin and facing the same problem.