Springfox is a Java library that automatically generates OpenAPI-compliant documentation for Spring-based REST services. It scans Spring controller annotations and model classes at runtime to produce machine-readable API specifications, and bootstraps an interactive Swagger UI interface on application startup for browsing and testing documented endpoints.
The project provides a migration path from Swagger 2 to OpenAPI 3, replacing legacy annotations and dependencies with OpenAPI 3 equivalents through a starter dependency and configuration change. It integrates with Spring's application context and request mapping infrastructure to discover endpoints without manual configuration, and leverages Spring Boot's auto-configuration mechanism for minimal setup.
Springfox uses Java reflection to inspect model fields, types, and annotations for generating accurate API schemas, and converts the internal documentation model into standard OpenAPI JSON structures using Jackson or similar serialization libraries. The library supports both Spring MVC and WebFlux endpoints, producing documentation automatically from annotated controllers without requiring manual specification writing.