Open ifjorissen opened 10 months ago
https://github.com/digitros/nextjs-fastapi/pull/9/files
Have you tried mapping the docs to the correct url while instantiating FastAPI like in this PR?
@ifjorissen ,
If you have simply cloned this repo or clicked the "Deploy to Vercel" button, I believe the next.config.js is currently configured to only deploy the Swagger UI if process.env.NODE_ENV === "development"
which is not the case in a production Vercel deployment.
Check the live demo-- https://nextjs-fastapi-starter.vercel.app/
According to next.config.js, the swagger UI should be at https://nextjs-fastapi-starter.vercel.app/docs, and the openapi.json at https://nextjs-fastapi-starter.vercel.app/openapi.json
However, both of those 404.
Have cloned this project locally & deployed it to vercel and can confirm I see the same behavior.
Any ideas on how to get the swagger ui and openapi.json to route correctly? Thanks!