
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@contractkit/plugin-openapi
Advanced tools
ContractKit plugin that generates an OpenAPI 3.0 YAML specification from .ck contract and operation files.
pnpm add @contractkit/contractkit-plugin-openapi
{
"plugins": {
"@contractkit/contractkit-plugin-openapi": {
"output": "openapi.yaml",
"info": {
"title": "Acme API",
"version": "1.0.0",
"description": "Public API for Acme services"
},
"servers": [
{ "url": "https://api.acme.com", "description": "Production" },
{ "url": "https://api.staging.acme.com", "description": "Staging" }
],
"security": [{ "bearerAuth": [] }],
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}
}
| Option | Type | Default | Description |
|---|---|---|---|
baseDir | string | rootDir | Base directory for the output file |
output | string | "openapi.yaml" | Output file path |
info.title | string | — | API title in the info block |
info.version | string | — | API version in the info block |
info.description | string | — | API description in the info block |
servers | array | — | List of server objects (url, optional description) |
security | array | — | Global security requirements (e.g. [{ "bearerAuth": [] }]) |
securitySchemes | object | — | Security scheme definitions added to components.securitySchemes |
type | Required fields | Description |
|---|---|---|
"http" | scheme ("bearer" or "basic"), optional bearerFormat | HTTP auth (Bearer JWT, Basic, etc.) |
"apiKey" | name, in ("header" or "query") | API key passed in a header or query param |
"oauth2" | — | OAuth 2.0 |
"openIdConnect" | — | OpenID Connect |
The plugin writes a single YAML file. All contract declarations become entries in components/schemas. All operation declarations become paths with their HTTP verbs, request bodies, parameters, and response schemas.
Operations marked internal are omitted from the generated spec by default. Set includeInternal: true in the plugin config to include them (e.g. for an internal-use API spec).
import { createOpenApiPlugin } from '@contractkit/contractkit-plugin-openapi';
const plugin = createOpenApiPlugin({
output: 'dist/openapi.yaml',
info: { title: 'My API', version: '2.0.0' },
servers: [{ url: 'https://api.example.com' }],
});
FAQs
ContractKit built-in plugin: OpenAPI 3.0 YAML generation
We found that @contractkit/plugin-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.