Skip to main content
Version: Next 🚧

Setup for SDK customization

This page explains how to setup customization of a generator if necessary.

Your package.json needs to contains a link to the customization library, typespec-client-generator-core:

{
"name": "clients",
"dependencies": {
"@typespec/compiler": "latest",
"@typespec/http": "latest",
"@typespec/rest": "latest",
"@azure-tools/typespec-azure-core": "latest",
"@azure-tools/typespec-client-generator-core": "latest"
},
"private": true
}

Customization should always be done in a file called client.tsp along with the main.tsp.

// client.tsp
import "./main.tsp";
import "@azure-tools/typespec-client-generator-core";

using Azure.ClientGenerator.Core;

// Your customizations here

Once you have a customization file, you should compile with your client.tsp to get output that includes the customizations:

tsp compile client.tsp