Spec Forge uses springdoc-openapi to generate OpenAPI specs from Spring Boot projects.
- Detection: Automatically detects Maven or Gradle build files
- Patching: Injects the springdoc-openapi plugin and configures the Spring Boot plugin
- Generation: Runs the appropriate build command to generate the OpenAPI spec
| Build Tool | Command Used |
|---|---|
| Maven | mvn verify |
| Gradle | gradle generateOpenApiDocs |
Wrapper Priority: spec-forge prefers project wrappers over system binaries:
./mvnw/./gradlewin project root- Wrapper in parent directory (for multi-module projects)
- System
mvn/gradle(fallback)
For Maven multi-module projects, spec-forge automatically configures the spring-boot-maven-plugin with start/stop goals to handle module dependencies.
# Basic generation
spec-forge generate ./my-spring-boot-project
# With AI enrichment
spec-forge generate ./my-spring-boot-project --language zh