ZuploZuplo
LoginSign Up
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop using the Portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingMCP - Quick start
    Develop Locally
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth
Concepts
Development
Policies
Handlers
API Keys
MCP Server
MCP Gateway
AI Gateway
Developer Portal
    IntroductionLocal DevelopmentUpdating VersionsNode Modules & Customization
    Configuration
    Writing
    OpenAPI
      API ReferenceAPI Catalog
      Supported Extensions
        x-mcpx-mcp-serverx-code-samplesx-tagGroupsx-displayNamex-zudoku-collapsedx-zudoku-collapsiblex-zudoku-playground-enabled
    Authentication
    Integrations
    Guides
    Extending
    Components
Monetization
Deploying & Source Control
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsSecuritySupportTrust & ComplianceChangelog
powered by Zudoku
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 May 29, 2026
x-mcp-serverx-tagGroups
On this page
  • Location
  • Code Sample Object
  • Example
YAML