عرض عملي: من مخرجات springdoc الخام إلى مرجع API قابل للاستخدام
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
improve generated docs until a newcomer can use them. Prepares JNR-021-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- 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.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.