Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By workos
Build, test, and maintain custom language SDKs generated from OpenAPI specs using the oagen framework — scafffold emitters and extractors, run compatibility checks, automate smoke tests, and fix regressions in a generate-verify loop.
npx claudepluginhub workos/oagenAudit an emitter's coverage of IR fields and produce a structured gap analysis. Use when checking if an emitter handles all IR types, after updating oagen, or verifying emitter completeness. Also triggers for "IR coverage", "emitter audit", "field coverage", "parity check".
Scaffold a new language emitter for oagen, implementing the Emitter interface with idiomatic target-language code generation. Use this skill whenever the user wants to add a new target language, generate SDKs for a new language, add Go/Python/Kotlin/Java/etc. support, create an emitter, or asks about code generation for a language — even if they don't use the word "emitter" explicitly. Also triggers when the user mentions "add language support" or "new SDK target".
Scaffold a new language extractor for oagen's compat system, implementing the Extractor interface to extract a live SDK's public API surface. Use when the user wants to add backwards-compatibility support, build an extractor, check for breaking changes or regressions, or asks about extracting an API surface for any language — even if they don't use the word "extractor" explicitly. Also triggers for "compat support", "API surface analysis", or "public surface extraction".
Orchestrate generating an SDK for a target language end-to-end. Determines the right scenario (backwards-compatible or fresh) and guides through the correct sequence of sub-skills. Use when the user wants to generate an SDK, add a new language, create SDK bindings, start a new language target, or asks "how do I add X support". Also triggers for "new SDK", "language support", or "scaffold SDK".
Create a smoke test script for a new SDK language that verifies wire-level HTTP parity against the OpenAPI spec and live API baseline. Use when adding smoke tests for a new language, verifying a generated SDK against the real API, or checking HTTP request/response correctness. Also triggers for "integration test", "wire-level test", "HTTP parity", or "end-to-end SDK test".
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
SDK generation and OpenAPI tooling with Speakeasy CLI
Generate client SDKs from OpenAPI specs for multiple languages
OpenAPI spec generation, validation, and client code scaffolding
Kubb is a meta framework for code generation. Generate TypeScript types, Zod schemas, Axios and fetch clients, React Query and Vue Query hooks, Faker mocks and more from an OpenAPI spec. The commands run the Kubb CLI, and a bundled MCP server adds conversational generation.
Creates professional API documentation using OpenAPI specifications with endpoints, authentication, and interactive examples. Use when documenting REST APIs, creating SDK references, or building developer portals.
OpenAPI CLI expert for @desplega.ai/oapi - register specs, execute requests, manage auth
WorkOS integration skills for AuthKit, SSO, Directory Sync, RBAC, Vault, Audit Logs, migrations, and API references.
oagen (oʊweɪdd͡ʒɛn) is a framework for building custom SDK generators from OpenAPI 3.x specifications.
Its core job is narrow:
More advanced workflows, such as preserving the public API of an existing SDK during a migration to generation, is also supported.
oagen is a fit if you:
oagen is probably not a fit if you:
oagen has a small core:
ApiSpec IRApiSpec -> GeneratedFile[]Advanced features such as API-surface extraction, compatibility overlays, smoke verification, and live-SDK integration are available, but they are optional. You can ignore them until you need them.
Install the package:
npm install @workos/oagen
Inspect a spec:
oagen parse --spec openapi.yml
Create an emitter project:
oagen init --lang ruby --project ./my-emitter
cd ./my-emitter
Generate files with your emitter:
npm run sdk:generate -- --spec ../openapi.yml --namespace MyService
For the shortest end-to-end setup, see Minimal Quickstart.
The default @workos/oagen entrypoint is intentionally focused on the framework core:
import {
defaultSdkBehavior,
mergeSdkBehavior,
diffSpecs,
generate,
generateFiles,
getEmitter,
parseSpec,
planOperation,
registerEmitter,
toCamelCase,
toPascalCase,
toSnakeCase,
} from "@workos/oagen";
import type {
ApiSpec,
SdkBehavior,
Emitter,
EmitterContext,
GeneratedFile,
Model,
Enum,
Service,
OperationPlan,
} from "@workos/oagen";
Advanced compat and verification APIs are available through explicit subpaths:
import {
buildOverlayLookup,
patchOverlay,
registerExtractor,
} from "@workos/oagen/compat";
import { runCompatCheck, runOverlayRetryLoop } from "@workos/oagen/verify";
Emitters are pure functions over the IR. They receive typed IR nodes and return GeneratedFile[].
import type { Emitter } from "@workos/oagen";
const myEmitter: Emitter = {
language: "go",
generateModels: (models, ctx) => [
/* ... */
],
generateEnums: (enums, ctx) => [
/* ... */
],
generateResources: (services, ctx) => [
/* ... */
],
generateClient: (spec, ctx) => [
/* ... */
],
generateErrors: () => [],
generateTests: () => [],
fileHeader: () => "// Auto-generated by oagen. Do not edit.",
};
Start with:
ApiSpec.sdk contains language-agnostic runtime policies — retry logic, error mapping, telemetry, pagination delays, User-Agent construction, and more. It is always populated (via defaultSdkBehavior() during parsing).
Emitters read policy from ctx.spec.sdk instead of hardcoding values:
function generateHttpClient(ctx: EmitterContext) {
const sdk = ctx.spec.sdk;
const retryCodes = sdk.retry.retryableStatusCodes; // [429, 500, 502, 503, 504]
const maxRetries = sdk.retry.maxRetries; // 3
const backoff = sdk.retry.backoff; // { initialDelay: 1, multiplier: 2, maxDelay: 30, jitterFactor: 0.5 }
// ...generate code using these values
}
Override defaults per-SDK via oagen.config.ts:
// oagen.config.ts — Python SDK overrides
export default {
sdkBehavior: {
retry: { backoff: { initialDelay: 0.5, maxDelay: 8.0 } },
timeout: {
defaultTimeoutSeconds: 30,
timeoutEnvVar: "WORKOS_REQUEST_TIMEOUT",
},
pagination: { autoPageDelayMs: 0 },
},
};
See src/ir/sdk-behavior.ts for all interfaces and default values.
resolveOperations(spec, hints?, mountRules?) derives method names and mount targets for every operation in the spec. The algorithm produces a snake_case name from the HTTP method and path, then applies optional overrides from a hint map.