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

Optimize: add spring doc for generating the open api docs #156

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

c5ms
Copy link
Contributor

@c5ms c5ms commented Dec 7, 2024

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

  1. add springdoc-openapi-starter-webmvc-ui for generating the open api documentation.

@c5ms c5ms marked this pull request as draft December 7, 2024 10:06
@orende orende requested review from mackapappa and orende December 13, 2024 16:55
@c5ms c5ms marked this pull request as ready for review December 13, 2024 21:51
@c5ms
Copy link
Contributor Author

c5ms commented Feb 17, 2025

@orende cloud you help to review it?

1 similar comment
@c5ms
Copy link
Contributor Author

c5ms commented Feb 17, 2025

@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.
Copy link
Contributor

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?

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

Successfully merging this pull request may close these issues.

2 participants