Demo: from bare springdoc output to a usable API reference
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
improve generated docs until a newcomer can use them. Prepares JNR-021-LAB1.
Draft outline details
Step by step
- Open the bare Swagger UI: no descriptions, no examples, no errors.
- Add
@Operationsummaries and@Schemadescriptions with examples on the DTOs. - Document
400,404, and409using the Problem Details shape. - Planned mistake: the docs say
200but the code returns201on create. Fix: correct the annotation and add a test that checks the status. - Export the spec and commit it to the repository.
- Ask a colleague to call every endpoint using only Swagger UI.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.