C
C#4d ago
_

OpenAPI Documents Empty

I upgraded my project to .NET 9, added the OpenAPI services on lines 6 and 16. Then when I go to https://localhost:<port>/openapi/v1.json I get a blank page. The port seems fine since none of the other ports connect to a page, this one does but there's nothing. I don't know what's wrong here. The only thing off I see in my output is 'Middleware: The WebRootPath was not found: C:<project directory>\wwwroot. Static files may be unavailable'
No description
No description
4 Replies
whatsinaname
whatsinaname4d ago
it should work, did u f12 and see the api response for the request?
_
_OP4d ago
i got this
No description
_
_OP4d ago
404 means it cant find the document? i think OpenAPI wasnt set up correctly but idk what exactly went wrong
_
_OP4d ago
moving the app.MapOpenApi out seemed to fix it
No description
Want results from more Discord servers?
Add your server