-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageCodeGenIssues that relate to code generationIssues that relate to code generation
Description
Overview
Parent issue: #56777
The base .NET emitter (microsoft/typespec#9922) will auto-generate ConfigurationSchema.json with the well-known client name under the Clients top-level section. The Azure emitter needs to override this to place Azure SDK clients under the AzureClients section instead.
Why this is needed
- System.ClientModel clients (base emitter) →
Clientssection inappsettings.json - Azure.Core clients (Azure emitter) →
AzureClientssection inappsettings.json
The base emitter doesn't know about the AzureClients section — it only generates schema entries under Clients. The Azure emitter must override the schema generation to:
- Place the well-known client name under
AzureClientsinstead ofClients - Reference
azureOptions(which includesRetry+Diagnostics) instead of the baseoptions - Reference the Azure.Identity
credentialdefinition instead of the SCMcredential
What to do
Override the base emitter's ConfigurationSchema.json generation in the Azure generator to:
- Output the schema to the package's
schema/directory (sibling ofsrc/) - Use
AzureClientsas the top-level section key - Use
$ref to#/definitions/azureOptionsfor the Options property - Use
$ref to#/definitions/credential(Azure.Identity's definition) for the Credential property - Include any client-specific options that extend
azureOptionsviaallOf
Reference
- Base emitter schema issue: microsoft/typespec#9922
- Azure emitter ClientSettings override: #56617
- Design proposal: https://gist.github.com/m-nash/54dc33e269485118b8da8d8cfa8759d0
- Prototype schemas:
temp/json-schema-segment-test
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageCodeGenIssues that relate to code generationIssues that relate to code generation
Type
Projects
Status
Untriaged