ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Getting Started
Concepts
API Management
AI Gateway
MCP Gateway
MCP Server
Developer Portal
    Overview
    Getting Started
      Updating VersionsNode Modules & CustomizationZuplo Branding
      Configuration
      Writing
      OpenAPI
        API ReferenceAPI Catalog
        Supported Extensions
          x-mcpx-mcp-serverx-code-samplesx-tagGroupsx-displayNamex-zudoku-collapsedx-zudoku-collapsiblex-zudoku-playground-enabledx-zudoku-type
      Authentication
      Integrations
      Guides
      Extending
      Components
    Development
    Deploying & Source Control
    Analytics
    Observability
    Networking & Infrastructure
    Account Management
    Programming API
    Build with AI
    Zuplo CLI
    Migration Guides
    Platform LimitsVersion Support PolicySecuritySupportTrust & ComplianceChangelog
    powered by Zuplo
    Supported Extensions

    x-code-samples

    Use x-code-samples (or x-codeSamples) to provide custom code snippets for an API operation. When present, these samples appear in the sidecar panel alongside the auto-generated request examples.

    Location

    The extension is added at the Operation Object level.

    OptionTypeDescription
    x-code-samples[Code Sample Object]Array of custom code samples.
    x-codeSamples[Code Sample Object]Alias for x-code-samples.

    Code Sample Object

    PropertyTypeRequiredDescription
    langstringYesLanguage identifier used for syntax highlighting.
    labelstringNoDisplay label for the tab. Defaults to lang value.
    sourcestringYesThe code snippet content.

    Example

    Code
    paths: /users: get: summary: List users x-code-samples: - lang: curl label: cURL source: | curl -X GET https://api.example.com/users \ -H "Authorization: Bearer $TOKEN" - lang: python label: Python source: | import requests response = requests.get( "https://api.example.com/users", headers={"Authorization": f"Bearer {token}"}, ) - lang: javascript label: JavaScript source: | const response = await fetch("https://api.example.com/users", { headers: { Authorization: `Bearer ${token}` }, }); responses: "200": description: Successful response
    Edit this page
    Last modified on October 1, 2026
    x-mcp-serverx-tagGroups
    On this page
    • Location
    • Code Sample Object
    • Example
    YAML