openapi_docs

Generates OpenAPI 3.0 documentation and Swagger UI for Spring Boot REST APIs.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill openapi-docs-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openapi_docs
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/openapi_docs
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill openapi-docs-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires springdoc-openapi-starter-webmvc-ui, springdoc-openapi-starter-webflux-ui, therapi-runtime-javadoc, and includes references (resource) components.

What problem does it solve? Manually writing and maintaining API documentation for Spring Boot REST endpoints is error-prone and quickly drifts out of sync with the actual code. This Skill automates the generation of OpenAPI 3.0 specifications and interactive Swagger UI directly from your controllers, models, and annotations. ## Core Features & Use Cases - Automated Spec Generation: Integrates SpringDoc OpenAPI into Spring Boot 3.x (WebMvc or WebFlux) to expose /v3/api-docs and Swagger UI endpoints. - Annotation-Driven Documentation: Documents controllers with @Tag, @Operation, @ApiResponse, request bodies with @ExampleObject, and models with @Schema plus JSR-303 validation constraints. - Security & Advanced Config: Documents JWT Bearer and OAuth2 security schemes, paginated endpoints via @ParameterObject, multiple API groups, and CI/CD spec generation with Maven/Gradle plugins. - Use Case: You are building a Spring Boot 3 REST API and need interactive, always-up-to-date documentation with JWT authentication support and realistic request/response examples for your frontend team. ## Quick Start Add SpringDoc OpenAPI to my Spring Boot project and document my BookController endpoints with Swagger UI and JWT security.

Frequently Asked Questions about openapi_docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Swagger UI to a Spring Boot 3 application?

Add the springdoc-openapi-starter-webmvc-ui dependency (version 2.x for Spring Boot 3) to your Maven or Gradle build. Swagger UI becomes available at /swagger-ui/index.html and the OpenAPI JSON at /v3/api-docs with no additional configuration.

How to document JWT authentication in SpringDoc OpenAPI?

Define a SecurityScheme bean of type HTTP with scheme bearer and bearerFormat JWT in an OpenAPI configuration bean. Then apply @SecurityRequirement(name = "bearer-jwt") on controllers or operations that require authentication.

Does SpringDoc support Spring WebFlux applications?

Yes, SpringDoc supports WebFlux through the separate springdoc-openapi-starter-webflux-ui dependency. Use the WebFlux starter instead of the WebMVC one, as the two dependencies are not interchangeable.

How do I document paginated endpoints with Spring Data Pageable?

Annotate the Pageable parameter with @ParameterObject from org.springdoc.core.annotations. SpringDoc then expands page, size, and sort as individual query parameters in the generated documentation.

Why is my endpoint not showing in Swagger UI?

Endpoints are hidden when annotated with @Hidden or @Operation(hidden = true), or when the controller package is outside springdoc.packages-to-scan. Also verify paths-to-match patterns include your endpoint's URL.

How do I generate an openapi.json file during the build?

Use the springdoc-openapi-maven-plugin bound to the integration-test phase, or the org.springdoc.openapi-gradle-plugin for Gradle. Both fetch the running app's /v3/api-docs endpoint and write the spec to a file.