Skip to content

feat(developer-tools): add stoplight-api-platform connector#279

Open
andrei-hasna wants to merge 1 commit into
mainfrom
station02-claude/open-connectors/a67ecf93-ed94-4b37-b6ce-a27a7f6d153d-8726ea46
Open

feat(developer-tools): add stoplight-api-platform connector#279
andrei-hasna wants to merge 1 commit into
mainfrom
station02-claude/open-connectors/a67ecf93-ed94-4b37-b6ce-a27a7f6d153d-8726ea46

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

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 the connectors/linkedin structure) — no platform-alumia code was copied.

What's included

  • Real API client (src/api/client.ts): fetch wrapper with typed StoplightApiError. Stoplight tokens are sent verbatim in the Authorization header — verified against the live API that a Bearer prefix is rejected as "Missing authorization", while a raw token yields INVALID_TOKEN.
  • Typed resource methods (src/api/index.ts), each grounded in live-probed routes:
    • GET /v1/workspaces/{id}/projects, /groups
    • GET /v1/projects/{id}, /branches, /members, /table-of-contents
    • GET /v1/projects/{ws}/{project}/nodes?uri=… (OpenAPI / model / markdown read + bundled export)
    • plus a generic request() escape hatch and fromEnv() reading STOPLIGHT_API_TOKEN.
  • CLI (src/cli/index.ts, commander + chalk): multi-profile config, config set-token / set-base-url, and workspace / project / node subcommands with --format json/table/pretty, --profile, --token, --base-url.
  • Utils/types: multi-profile config under ~/.hasna/connectors/connect-stoplight-api-platform, output formatter, and Stoplight type definitions.
  • Registry: one entry added to src/lib/connectors/developer-tools.ts (category "Developer Tools", already exists — no CATEGORIES change).
  • Placeholder-only .env.example, .npmrc, .gitignore, CLAUDE.md, README.md.
  • Focused unit tests (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) — pass
  • bun test (connector) — 9 pass / 0 fail
  • bun build src + cli — pass
  • bun test src/lib/registry.test.ts (root) — 28 pass / 0 fail
  • bun run typecheck (root) — pass
  • Live smoke test: CLI reached the real API and returned the expected auth error
  • Risk scan: no alumia/platform-alumia/internal refs, no secrets, no browser-use/scraper deps

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant