Back to Scalar

Ruby

documentation/guides/sdks/configuration/ruby.md

latest2.4 KB
Original Source

Ruby

This section details the available configuration options for the Ruby SDK. All configuration is managed in the gen.yaml file under the ruby section.

Version and general configuration

yml
ruby:
  version: 1.2.3
  author: "Author Name"
  packageName: "custom-sdk"
NameRequiredDefault ValueDescription
versiontrue0.0.1The current version of the SDK.
packageNametrueopenapiThe name of the package.
authortrueSpeakeasyThe name of the author of the published package.

Method and parameter management

yml
ruby:
  maxMethodParams: 4
NameRequiredDefault ValueDescription
maxMethodParamsfalse4Sets the maximum number of parameters before an input object is created. 0 means input objects are always used.

Module management

yml
ruby:
  module: "OpenApiSdk"
NameRequiredDefault ValueDescription
moduletrueOpenAPISdkSee Docs.

Import management

yml
ruby:
  imports:
    option: "openapi"
    paths:
      callbacks: models/callbacks
      errors: models/errors
      operations: models/operations
      shared: models/components
      webhooks: models/webhooks
FieldRequiredDefault ValueDescription
optionfalse"openapi"Defines the type of import strategy. Typically set to "openapi", indicating that the structure is based on the OpenAPI document.
pathsfalse{}Customizes where different parts of the SDK (e.g., callbacks, errors, and operations) will be imported from.

Import paths

ComponentDefault ValueDescription
callbacksmodels/callbacksThe directory where callback models will be imported from.
errorsmodels/errorsThe directory where error models will be imported from.
operationsmodels/operationsThe directory where operation models (i.e., API endpoints) will be imported from.
sharedmodels/componentsThe directory for shared components, such as reusable schemas, and data models imported from the OpenAPI spec.
webhooksmodels/webhooksThe directory for webhook models, if the SDK includes support for webhooks.