-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Optimize: add spring doc for generating the open api docs #156
Conversation
…dev/springboot3_springdoc
@orende cloud you help to review it? |
1 similar comment
@orende cloud you help to review it? |
@@ -54,4 +54,4 @@ You can use cURL to send the request using an JSON file for the body: | |||
-H 'Content-Type: application/json;charset=UTF-8' \ | |||
http://localhost:8080/dddsample/handlingReport | |||
|
|||
See the [api-docs.yaml](/api-docs.yaml) file for a complete API definition. | |||
open http://127.0.0.1:8080/dddsample/swagger-ui/index.html for a complete API definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't localhost work instead of 127.0.0.1 here?
Hello! We're going to respectfully decline this PR as the addition of a dependency to auto-generate OpenAPI spec files feels unnecessary in a project with only two single API endpoints. For a project with a larger amount of endpoints or more complex endpoints, this functionality would be a very good choice, however. |
Why
The current open api document is hard-code in the projects, We should have some manner to generate the documentation based on the code itself.
Once we change the code, we will get the open api document at time.
Once we can see the full document we will find out what the schema model we have in the interfaces layer and how many endpoint we have exposed , etc.
So it can help use to know the interfaces layer implementation in a visual way and easy to debug.
It also can help the user(who want to learn from this project) to get the api description.
What