Add Admin API documentation alongside Cycles Protocol API#26
Merged
Conversation
Expose the cycles-server-admin OpenAPI spec as a second interactive API reference section at /admin-api/. The existing Cycles Protocol API remains at /api/. Navigation now uses a dropdown to link both specs. - Refactor convert-spec.js to handle both YAML specs - Add admin sidebar and dropdown nav in VitePress config - Create admin-api/ pages with OASpec/OAOperation using :spec prop - Update CI workflow to checkout cycles-server-admin repo https://claude.ai/code/session_01WovqCqTJJdoDwpdDym4UM4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for documenting the Admin API alongside the existing Cycles Protocol API. The changes refactor the spec conversion script to be reusable, add Admin API documentation pages, and update the navigation to support multiple API references.
Key Changes
scripts/convert-spec.js): Extracted the hardcoded spec conversion logic into a reusableconvertSpec()function that accepts a spec name, candidate paths, and output filename. Now converts both the Cycles Protocol spec and the Admin API spec.admin-api/index.md: Overview page for the Admin API referenceadmin-api/operations/[operationId].md: Dynamic operation detail pagesadmin-api/operations/[operationId].paths.js: Path generation for Admin API operations.vitepress/config.ts):admin-openapi.jsonspecadminApiSidebarusing the Admin API spec/admin-api/sidebar configuration with generated operation groups.github/workflows/deploy.yml): Added checkout step for thecycles-server-adminrepository to make the Admin API spec available during deploymentImplementation Details
convertSpec()function handles spec discovery across multiple candidate paths (environment variable, local dev sibling repo, CI workspace), with improved error messaging that shows all searched locationscycles-server-admin/complete-budget-governance-v0.1.23.yamland converted topublic/admin-openapi.jsonvitepress-openapiintegration pattern for consistent documentation generationhttps://claude.ai/code/session_01WovqCqTJJdoDwpdDym4UM4