Skip to content

giuseppe-trisciuoglio/developer-kit / plugins/developer-kit-java/skills/spring-boot-openapi-documentation

spring-boot-openapi-documentation

Verified

Provides patterns to generate comprehensive REST API documentation using SpringDoc OpenAPI 3.0 and Swagger UI in Spring Boot 3.x applications. Use when setting up API documentation, configuring Swagger UI, adding OpenAPI annotations, implementing security documentation, or enhancing REST endpoints with examples and schemas.

references/configuration.md

View on GitHub
# SpringDoc Configuration

## Basic Configuration

### application.properties

```properties
# API Documentation Path
springdoc.api-docs.path=/api-docs
springdoc.api-docs.enabled=true

# Swagger UI Configuration
springdoc.swagger-ui.path=/swagger-ui.html
springdoc.swagger-ui.enabled=true
springdoc.swagger-ui.operationsSorter=method
springdoc.swagger-ui.tagsSorter=alpha
springdoc.swagger-ui.tryItOutEnabled=true

# Package and Path Filtering
springdoc.packages-to-scan=com.example.controller
springdoc.paths-to-match=/api/**
```

### application.yml

```yaml
springdoc:
  api-docs:
    path: /api-docs
    enabled: true
  swagger-ui:
    path: /swagger-ui.html
    enabled: true
    operationsSorter: method
    tagsSorter: alpha
    tryItOutEnabled: true
  packages-to-scan: com.example.controller
  paths-to-match: /api/**
```

## Access Endpoints

After configuration:
- **OpenAPI JSON**: `http://localhost:8080/v3/api-docs`
- **OpenAPI YAML**: `http://localhost:8080/v3/api-docs.yaml`
- **Swagger UI**: `http://localhost:8080/swagger-ui/index.html`

## Advanced Configuration Options

### Disable Specific Features

```properties
# Disable Swagger UI
springdoc.swagger-ui.enabled=false

# Disable API docs
springdoc.api-docs.enabled=false

# Disable try-it-out
springdoc.swagger-ui.tryItOutEnabled=false
```

### Sort Options

- **operationsSorter**: `method` (HTTP method), `alpha` (alphabetical)
- **tagsSorter**: `alpha` (alphabetical)
- **defaultModelsExpandDepth**: Controls model expansion in UI

### Filter by Package/Path

```properties
# Scan multiple packages
springdoc.packages-to-scan=com.example.controller,vendor.another.controller

# Match multiple paths
springdoc.paths-to-match=/api/**,/public/**

# Exclude paths
springdoc.paths-to-exclude=/actuator/**,/admin/**
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 469kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall