http://localhost:8080/swagger-ui.html → Interactive docs
http://localhost:8080/v3/api-docs → Auto-generated OpenAPI JSON
Benefits of OpenAPI
1. Single source of truth – Your API contract is documented in a standard format, independent of backend or frontend.
2. Auto-generated clients & servers – You can generate Java, TypeScript, Python, etc. stubs instead of hand-writing models and request/response code.
3. Validation – Ensures backend and frontend stay aligned, preventing “works on my machine” API mismatches.
4. Interactive docs (Swagger UI, Redoc) – Makes testing APIs easier for QA, frontend, and even business teams.
5. API governance – Large enterprises (like Standard Chartered, Visa, etc.) enforce consistency, versioning, and security policies through OpenAPI specs.