Skip to content

Data types

Client initialization customization options.

In addition to the properties below, this inherits scope from DecoratorOptions, so options.scope can select which language emitters the @clientInitialization customization applies to.

model Azure.ClientGenerator.Core.ClientInitializationOptions
NameTypeDescription
parameters?ModelRedefine the client initialization parameters you would like to add to the client. All the model properties should have corresponding operation level parameters.
By default, we apply endpoint, credential, and API version parameters. If you specify a parameters model, we will append the properties of the model to the parameters list of the client initialization.
initializedBy?EnumMember | UnionDetermines how the client can be initialized. Use InitializedBy enum to set the value. The value can be InitializedBy.individually, InitializedBy.parent or InitializedBy.individually | InitializedBy.parent.

Client customization options.

In addition to the properties below, this inherits scope from DecoratorOptions, so options.scope can select which language emitters the @client customization applies to.

model Azure.ClientGenerator.Core.ClientOptions
NameTypeDescription
service?Namespace | Namespace[]The services that this client is generated for. The root explicit client must have service config.
The namespace should be decorated with @service.
name?stringThe name of the client. If not specified, the default name will be <Name of the target>Client.
autoMergeService?booleanAuto-merge service’s things into current client.

Common typed options bag for the scope argument accepted by scoped TCGC decorators.

Every scoped decorator’s own options model can extend this base so new, decorator-specific settings can be added over time without breaking the legacy plain-string scope argument.

Supported language identifiers: csharp, python, java, javascript, go, and other language emitter names (derived from the emitter package name, e.g., @azure-tools/typespec-csharpcsharp).

Valid patterns for scope:

  • Single language: "python"
  • Multiple languages (comma-separated): "python, java"
  • Negation to exclude languages: "!csharp" or "!(java, python)"
model Azure.ClientGenerator.Core.DecoratorOptions
NameTypeDescription
scope?stringSpecifies the target language emitters that a decorator should apply to. If not set, the
decorator applies to all language emitters by default.

Represents an external type that can be used in alternate type definitions.

model Azure.ClientGenerator.Core.ExternalType
NameTypeDescription
identitystringThe identity of the external type. For example, pystac.Collection
package?stringThe package that exports the external type. For example, pystac
minVersion?stringThe minimum version of the package to use for your external type. For example, 1.13.0

Access value.

enum Azure.ClientGenerator.Core.Access
NameValueDescription
public"public"Open to user
internal"internal"Hide from user

Defines how client documentation should be applied

enum Azure.ClientGenerator.Core.DocumentationMode
NameValueDescription
append"append"Append client documentation to the existing doc
replace"replace"Replace the existing doc with client documentation

InitializedBy value.

enum Azure.ClientGenerator.Core.InitializedBy
NameValueDescription
individually1The client could be initialized individually.
parent2The client could be initialized by parent client.
customizeCode4The client initialization should be omitted from generated code and handled manually in custom code.

Usage value.

enum Azure.ClientGenerator.Core.Usage
NameValueDescription
input2Used in request
output4Used in response
json256Used with JSON content type
xml512Used with XML content type