Creating Swagger UI for Frappe: A Comprehensive Guide

Sorry for the late reply!

You can now integrate Swagger UI with Frappe apps using my new app. Install it with:

bench get-app https://github.com/omkardarves/swagger

Swagger Generator for Frappe Apps offers:

  • Automatic Swagger UI Generation for API endpoints.
  • Customizable for APIs in the app_name/api folder.
  • Pydantic Model Integration for request bodies.

Setup:

  1. Place your APIs in the app_name/api folder.
  2. In the “Swagger Settings” doctype, click “Generate Swagger JSON.”
  3. Access the Swagger UI via the swagger.html file.

For more details, check the README.md. Let me know if you have any questions!
I have also added it to Frappe Marketplace, it is under review.

7 Likes