OpenAPI document has a different PORT #6989
megashrieks
started this conversation in
General
Replies: 1 comment 1 reply
-
See dotnet/aspnetcore#57332. Yes it because of the proxy. The open api support in asp.net core should handle this better. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm on dotnet 9.0, and somehow
AddOpenApi
creates an openapi spec that has a different port specified in the documentand each time the application starts the port is assigned randomly, I'm guessing that this might somehow be related to the proxy created by aspire?
I use scalar, and this is annoying since everytime I need to call an API after restarting my application, I need to go to
Aspire Dashboard > My application scalar end point > call the api
since upon restart the port changes everytime I cant just keep the scalar page loaded
any idea on how I can disable this? or is this occuring from Aspire at all?
here is my launchsettings.json
openapi generated
Currently I've hardcoded the port in Openapi document transformer, but I would prefer it if there was a better solution to this
Beta Was this translation helpful? Give feedback.
All reactions