feat(developer-tools): add stoplight-api-platform connector#279
Open
andrei-hasna wants to merge 1 commit into
Open
Conversation
Add @hasna/connect-stoplight-api-platform, a first-class connector for the Stoplight API design/docs/governance platform, rebuilt against the public Stoplight API (https://stoplight.io/api) and existing open-connectors patterns. - Real Bearer-less token client: Stoplight tokens are sent verbatim in the Authorization header (a "Bearer" prefix is rejected as "Missing authorization"). - Endpoints verified against the live API: workspace projects/groups, project get/branches/members/table-of-contents, and node (OpenAPI/model/markdown) read and bundled export; plus a generic request() escape hatch. - CLI (commander + chalk) with multi-profile config, config set-token/set-base-url, and workspace/project/node subcommands; json/table/pretty output. - Placeholder-only .env.example, focused client unit tests, typecheck + build. - Register under Developer Tools category. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Adds
@hasna/connect-stoplight-api-platform, a first-class open-connectors package for the Stoplight API design, documentation, and governance platform. Rebuilt against the public Stoplight API (https://stoplight.io/api) and existing connector patterns (mirrors theconnectors/linkedinstructure) — noplatform-alumiacode was copied.What's included
src/api/client.ts): fetch wrapper with typedStoplightApiError. Stoplight tokens are sent verbatim in theAuthorizationheader — verified against the live API that aBearerprefix is rejected as "Missing authorization", while a raw token yieldsINVALID_TOKEN.src/api/index.ts), each grounded in live-probed routes:GET /v1/workspaces/{id}/projects,/groupsGET /v1/projects/{id},/branches,/members,/table-of-contentsGET /v1/projects/{ws}/{project}/nodes?uri=…(OpenAPI / model / markdown read + bundled export)request()escape hatch andfromEnv()readingSTOPLIGHT_API_TOKEN.src/cli/index.ts, commander + chalk): multi-profile config,config set-token/set-base-url, andworkspace/project/nodesubcommands with--formatjson/table/pretty,--profile,--token,--base-url.~/.hasna/connectors/connect-stoplight-api-platform, output formatter, and Stoplight type definitions.src/lib/connectors/developer-tools.ts(category "Developer Tools", already exists — no CATEGORIES change)..env.example,.npmrc,.gitignore,CLAUDE.md,README.md.src/api/client.test.ts): URL building, Bearer-less auth header, custom base URL, error mapping, 204 handling, token preview.Validation
bunx tsc --noEmit(connector) — passbun test(connector) — 9 pass / 0 failbun buildsrc + cli — passbun test src/lib/registry.test.ts(root) — 28 pass / 0 failbun run typecheck(root) — passalumia/platform-alumia/internal refs, no secrets, no browser-use/scraper deps🤖 Generated with Claude Code