update-contest-api-docs

Synchronize OpenAPI 3.1.0 documentation for /api/contest endpoints with route implementations.

1|Updated Jan 7, 2025
One-click install
npx skills add https://github.com/The-INTJ/item-dc-calculator --skill update-contest-api-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-contest-api-docs
Source: https://github.com/The-INTJ/item-dc-calculator/tree/main/.claude/skills/update-contest-api-docs
Command: npx skills add https://github.com/The-INTJ/item-dc-calculator --skill update-contest-api-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps the OpenAPI documentation for the /api/contest endpoints in sync with the actual API implementation as routes evolve.

Core Features & Use Cases

  • Analyze all relevant route files under app/api/contest (current, contests, entries, scores, docs) to extract HTTP methods, path parameters, and request/response schemas.
  • Update the OpenAPI file at app/api/contest/openapi.json to reflect current implementation and ensure consistency with existing components/schemas and the security scheme.
  • Provide a maintainable spec that supports developers and tooling by documenting endpoints, request bodies, and response structures.

Quick Start

After updating any contest API route, run the skill to refresh and align the OpenAPI specification.

Frequently Asked Questions about update-contest-api-docs

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

FAQPage Schema
How do I sync OpenAPI documentation with my API implementation?

You can sync OpenAPI documentation by analyzing route files to extract HTTP methods, path parameters, and request/response schemas, then updating the OpenAPI spec to reflect the current codebase.

How do I update an OpenAPI 3.1.0 spec to match new contest API routes?

Update an OpenAPI 3.1.0 spec by analyzing all relevant contest route files, extracting the current endpoints and schemas, and modifying the openapi.json file to ensure consistency with components/schemas and AdminRole security definitions.

What's the best way to maintain API documentation accuracy for evolving endpoints?

Maintain API documentation accuracy by running a synchronization process after updating any API route, which extracts the live HTTP methods and schemas from route files and aligns the OpenAPI specification accordingly.

Does this OpenAPI synchronization approach support extracting path parameters and request bodies from route files?

Yes, this OpenAPI synchronization approach supports extracting HTTP methods, path parameters, and request/response schemas directly from route files to update the specification and document endpoints accurately.

Why does my OpenAPI spec show outdated response schemas after changing contest routes?

Your OpenAPI spec shows outdated response schemas because the documentation file has not been synchronized with the live API implementation, requiring an extraction and update process to align the spec.

Can I use this method to document AdminRole security definitions in an OpenAPI spec?

Yes, you can use this method to document AdminRole security definitions by ensuring the updated OpenAPI spec maintains consistency with the existing security scheme and components/schemas during the synchronization process.