Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex API Gateway
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Creating API gateways
    • Updating API gateways and their specifications
    • Connecting a domain
    • Deleting API gateways
    • Monitoring
    • Viewing the execution log
  • Tutorials
    • All practical guidelines
    • Deploying a web application using the Java Servlet API
    • Developing a skill for Alice and a website with authorization
    • Developing a Slack bot
    • Developing a Telegram bot
    • Developing user integration
    • Developing CRUD APIs for movie services
    • Communicating with an API gateway using the WebSocket protocol
  • Concepts
    • Relationships between service resources
    • Specification extensions
      • Overview
      • Static response
      • Invoking a function
      • Integration with Serverless Containers
      • Access via HTTP
      • Integration with Object Storage
      • Integration with DataSphere
      • Integration with Data Streams
      • Integration with Message Queue
      • Integration with YDB
      • Greedy parameters
      • Generalized HTTP method
      • Authorization using a function
      • WebSocket protocol support
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ApiGatewayService
      • OperationService
    • REST
      • Overview
      • ApiGateway
        • Overview
        • addDomain
        • create
        • delete
        • get
        • getOpenapiSpec
        • list
        • listAccessBindings
        • listOperations
        • removeDomain
        • setAccessBindings
        • update
        • updateAccessBindings
  • Websocket API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ConnectionService
    • REST
      • Overview
      • Connection
        • Overview
        • disconnect
        • get
        • send
  • Questions and answers
  1. Concepts
  2. Specification extensions
  3. Greedy parameters

Greedy parameters

Written by
Yandex Cloud
  • Extension specification

The OpenAPI Specification 3.0 only allows capturing a single URL segment. To capture multiple segments, add + after the parameter name: /prefix/{param+}/suffix.

For example, to capture /static/js/main.js, add to the specification /static/{file+} instead of /static/{file}.

Greedy parameters are compatible with all x-yc-apigateway-integration extension types.

Extension specification

Sample specification:

/static/{file+}:
    get:
      summary: Serve static file from Yandex Cloud Object Storage
      parameters:
        - name: file
          in: path
          required: true
          schema:
            type: string
      x-yc-apigateway-integration:
        type: object_storage
        bucket: my-example-bucket
        object: '{file}'
        error_object: error.html

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC