cbswagger

Generate OpenAPI 3.0 JSON specs from ColdBox handler annotations.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill cbswagger
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cbswagger
Source: https://github.com/ColdBox/skills/tree/main/modules/cbswagger
Command: npx skills add https://github.com/ColdBox/skills --skill cbswagger

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generating accurate, up-to-date OpenAPI documentation for ColdBox/BoxLang REST APIs can be manual, inconsistent, and easily drift from the codebase; this skill automates extraction of endpoint metadata from handler annotations and schema files so documentation stays synchronized with implementation.

Core Features & Use Cases

  • Annotation-driven spec generation: Scan ColdBox handlers and action-level JSDoc annotations to produce OpenAPI 3.x JSON.
  • Schema management: Load shared JSON schema files for request and response shapes to avoid duplication.
  • Security and UI integration: Define JWT/Bearer security schemes, host Swagger UI and ReDoc endpoints, and configure json output paths for CI/CD.
  • Use Case: A backend team annotates handlers and runs the generator in CI to commit a canonical spec and publish a protected developer UI.

Quick Start

Scan the project's ColdBox handlers and generate a complete OpenAPI 3.0 JSON specification using cbswagger configuration and handler annotations.

Frequently Asked Questions about cbswagger

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

FAQPage Schema
How do I generate OpenAPI documentation from ColdBox handler annotations?

cbswagger scans ColdBox REST handlers and action-level JSDoc annotations to automatically produce a compliant OpenAPI 3.0 JSON specification, ensuring API documentation stays synchronized with the codebase.

What is the best way to keep Swagger docs synchronized with a ColdBox REST API?

Annotation-driven spec generation extracts endpoint metadata directly from ColdBox handler annotations and JSON schema files, preventing manual documentation drift and keeping Swagger docs synchronized with the REST API implementation.

Can I host Swagger UI and ReDoc routes directly within my ColdBox application?

Yes, you can host Swagger UI and ReDoc routes directly within your ColdBox application. The generation process exposes these endpoints natively, allowing you to publish a protected developer discovery UI alongside your REST API.

Does cbswagger support external JSON schema files for request and response shapes?

Yes, cbswagger supports loading shared external JSON schema files for request and response shapes. This schema management capability allows you to avoid duplication when documenting complex API payloads across multiple endpoints.

How do I define JWT or Bearer security schemes in OpenAPI for a ColdBox API?

You define JWT or Bearer security schemes in OpenAPI for a ColdBox API by configuring security definitions within the generator, which extracts these schemes from module configurations to document protected endpoints in the JSON spec.

Can I run OpenAPI spec generation in CI pipelines for ColdBox APIs?

Yes, you can run OpenAPI spec generation in CI pipelines for ColdBox APIs. The generator supports configurable output paths, allowing backend teams to commit a canonical OpenAPI 3.0 JSON spec automatically during continuous integration.