Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swagger URL to startup output #81

Closed
ttu opened this issue May 15, 2021 · 3 comments
Closed

Add Swagger URL to startup output #81

ttu opened this issue May 15, 2021 · 3 comments

Comments

@ttu
Copy link
Owner

ttu commented May 15, 2021

Current output

Datastore file: datastore.json
Datastore location: /home/tomi/src/github/dotnet-fake-json-server/FakeServer
Static files: default wwwroot
Hosting environment: Development
Content root path: /home/xxxx/dotnet-fake-json-server/FakeServer
Now listening on: http://localhost:57603
Application started. Press Ctrl+C to shut down.

Add Swagger Open API as a last line.

Now listening on: http://localhost:57603
Application started. Press Ctrl+C to shut down.
Swagger Open API is available on: http://localhost:57603/swagger  

Pretty likely this needs to be done in Startup.cs as we need to be able to check what is the current port in use.

@s-a-n-i-n
Copy link

Would turning off default .net core startup messaging and logging out to console manually be acceptable?
AFAIK, you want to inject line between two default core startup messages ("now listening" and "app started") which is not possible.

@ttu
Copy link
Owner Author

ttu commented Oct 3, 2021

Hi. Forgot that those 2 lines are from framework.

No need to do any extra work by configuring messages. Swagger-line can be after Content root path-line and before those default .net core startup messages.

@ttu
Copy link
Owner Author

ttu commented Nov 6, 2021

Updated the description, as we need to read the current port and maybe that is easiest to do in Startup.cs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants