update-api-reference

Regenerate OpenAPI reference documentation from Go swag annotations.

25|13|Updated Apr 27, 2025
One-click install
npx skills add https://github.com/blaxel-ai/sandbox --skill update-api-reference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-api-reference
Source: https://github.com/blaxel-ai/sandbox/tree/main/.agents/skills/update-api-reference
Command: npx skills add https://github.com/blaxel-ai/sandbox --skill update-api-reference

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures that the API reference documentation accurately reflects the current state of the sandbox-api, preventing outdated or misleading information for developers.

Core Features & Use Cases

  • Automated Documentation Generation: Regenerates OpenAPI (Swagger) documentation from Go code annotations.
  • Endpoint Synchronization: Keeps API documentation in sync with code changes, including new, modified, or removed endpoints.
  • Use Case: After adding a new /users endpoint to the sandbox-api, run this skill to update openapi.yml and docs.go so the API documentation is immediately current.

Quick Start

Run the full reference update command to regenerate the OpenAPI documentation.

Frequently Asked Questions about update-api-reference

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

FAQPage Schema
How do I regenerate OpenAPI documentation from Go swag annotations?

To regenerate OpenAPI documentation from Go swag annotations, this skill parses your Go code to update API endpoint definitions and outputs a current openapi.yml file. It ensures your API documentation reflects recent code modifications.

How do I convert Swagger 2.0 to OpenAPI 3.0 for my API?

Converting Swagger 2.0 to OpenAPI 3.0 is handled automatically during the documentation generation process. The skill parses Go code annotations and applies the necessary conversion to produce an updated OpenAPI 3.0 specification.

How do I keep API documentation in sync with code changes?

Keeping API documentation in sync with code changes requires running this skill after modifying endpoints. It updates the openapi.yml and docs.go files to accurately reflect any new, modified, or removed API endpoints.

Does this documentation generator apply security schemes to the OpenAPI spec?

Yes, generating the OpenAPI spec includes applying necessary security schemes and patches. This ensures the final reference documentation is accurate and properly secured after the conversion from Swagger 2.0.

When should I regenerate OpenAPI docs for my sandbox-api?

You should regenerate OpenAPI docs for your sandbox-api immediately after adding, modifying, or removing endpoint code. Running the update command ensures the API reference documentation is current and prevents outdated information for developers.