Complete reference for catalog overrides. Overrides modify how API specs are interpreted without changing the original spec files.
All overrides share a common structure:
scope: string # What this override applies totype: string # Override type (oauth, bearer, description, etc.)strategy?: string # When to apply (always, when-missing, when-undeclared)# ... type-specific properties| Pattern | Applies To |
|---|---|
* | All operations in catalog |
serviceName/* | All operations from an API |
serviceName/operationName | Specific operation |
More specific scopes take precedence over broader ones.
| Strategy | Behavior |
|---|---|
always | Apply regardless of what spec declares |
when-missing | Apply only if spec doesn’t define it |
when-undeclared | Apply only if no security scheme is declared |
Default strategy varies by override type.
Fix or define authentication schemes for APIs.
Define OAuth 2.0 authentication.
type: oauthschemeName: string # Security scheme namegrantType: string # OAuth grant typeauthorizationUrl?: string # Authorization endpointtokenUrl: string # Token endpointscopes?: string[] # Required scopesrealm: string # Credential storage realmnormalizeHeaders?: boolean # Convert auth header paramsstrategy?: string # Default: when-undeclaredGrant Types:
| Type | Description |
|---|---|
authorization_code | Standard web flow with redirect |
client_credentials | Machine-to-machine, no user |
refresh_token | Token refresh flow |
Example:
scope: github/*type: oauthschemeName: github_oauthgrantType: authorization_codeauthorizationUrl: https://github.com/login/oauth/authorizetokenUrl: https://github.com/login/oauth/access_tokenscopes: - repo - userrealm: toolcog/githubDefine HTTP Bearer token authentication.
type: bearerschemeName: string # Security scheme namerealm?: string # Credential storage realmnormalizeHeaders?: boolean # Convert auth header paramsstrategy?: string # Default: when-undeclaredExample:
scope: myapi/*type: bearerschemeName: bearerAuthnormalizeHeaders: truerealm: myorg/myapi-realmHeader Normalization:
When normalizeHeaders: true, Toolcog:
Authorization header parameters in the specDefine HTTP Basic authentication.
type: basicschemeName: string # Security scheme namerealm?: string # Credential storage realmnormalizeHeaders?: boolean # Convert auth header paramsstrategy?: string # Default: when-undeclaredExample:
scope: legacy-api/*type: basicschemeName: basicAuthnormalizeHeaders: trueDefine API key authentication.
type: apikeyschemeName: string # Security scheme namein: string # Where key goes (header, query, cookie)name: string # Parameter namerealm?: string # Credential storage realmnormalizeHeaders?: boolean # Convert auth header paramsstrategy?: string # Default: when-undeclaredLocations:
| Value | Description |
|---|---|
header | API key in request header |
query | API key in query string |
cookie | API key in cookie |
Example:
scope: weather-api/*type: apikeyschemeName: apiKeyin: headername: X-API-KeyModify operation descriptions and summaries.
Replace an operation’s description.
type: descriptionvalue: string # New description (supports multiline)strategy?: string # Default: alwaysExample:
scope: stripe/customers.createtype: descriptionvalue: | Creates a new customer in your Stripe account.
The customer object represents a customer of your business. Use this to store contact information and payment methods.
Required parameters: - email: Customer's email address
Optional parameters: - name: Customer's full name - metadata: Key-value pairs for custom dataReplace an operation’s summary (short one-liner).
type: summaryvalue: string # New summarystrategy?: string # Default: alwaysExample:
scope: stripe/customers.createtype: summaryvalue: Create a new customerModify API structure and behavior.
Change the base URL for API calls.
type: serverurl: string # New server URLstrategy?: string # Default: alwaysExample:
scope: myapi/*type: serverurl: https://staging-api.example.comUse Cases:
Mark an operation as deprecated.
type: deprecatedvalue: boolean # true to mark deprecatedstrategy?: string # Default: alwaysExample:
scope: legacy-api/users.listtype: deprecatedvalue: trueDeprecated operations:
Remove examples and extensions from specs.
type: stripexamples?: boolean # Remove example valuesextensions?: boolean # Remove x-* extensionsstrategy?: string # Default: alwaysExample:
scope: verbose-api/*type: stripexamples: trueextensions: trueUse Cases:
Modify a parameter’s properties.
type: parametername: string # Parameter namedescription?: string # New descriptionrequired?: boolean # Whether requiredstrategy?: string # Default: alwaysExample:
scope: api/users.createtype: parametername: customer_iddescription: The unique identifier for the customer (UUID format)required: trueIdentifies the security scheme. Must match the scheme name used in operations’ security requirements.
schemeName: bearerAuth # Operations declare: security: [{ bearerAuth: [] }]Links to credential storage. Format: {owner}/{realm-name}.
realm: toolcog/github # Toolcog-managed GitHub OAuthrealm: myorg/internal-api # Organization's custom realmRealms are configured separately with OAuth client credentials.
Converts header-based auth parameters to proper security schemes.
Many APIs incorrectly declare auth as:
parameters: - name: Authorization in: header required: trueWith normalizeHeaders: true, Toolcog:
Controls when the override applies.
always (default for most types):
strategy: always # Override regardless of specwhen-missing (for filling gaps):
strategy: when-missing # Only if spec doesn't definewhen-undeclared (default for auth types):
strategy: when-undeclared # Only if no security declaredWhen multiple overrides could apply to the same operation:
api/operation) applies firstapi/*) applies second*) applies lastWithin the same scope, overrides are applied in definition order.
Example:
# Applied third (most general)- scope: "*" type: bearer schemeName: defaultAuth
# Applied second- scope: stripe/* type: oauth schemeName: stripeOAuth
# Applied first (most specific)- scope: stripe/customers.create type: description value: Custom description for this operation- scope: "*" type: bearer schemeName: bearerAuth normalizeHeaders: true- scope: github/* type: oauth schemeName: github_oauth grantType: authorization_code authorizationUrl: https://github.com/login/oauth/authorize tokenUrl: https://github.com/login/oauth/access_token scopes: - repo - user:email realm: toolcog/github- scope: myapi/* type: server url: https://staging.myapi.com/v2- scope: payments/charge.create type: description value: | Creates a charge against a customer's payment method.
The charge is captured immediately unless capture: false is set. Returns the charge object on success.
- scope: payments/charge.create type: summary value: Create a payment charge- scope: verbose-vendor/* type: strip examples: true extensions: true- scope: v1/* type: deprecated value: trueOverrides are validated when saved:
Invalid overrides are rejected with specific error messages.