How to generate client libraries
This page outlines the steps to build a client library based on your TypeSpec specification. It provides a guide for the whole process from initial API design to the release of SDKs. please visit https://aka.ms/azsdk/dpcodegen.
The best documentation on how to generate can be found using those links:
- https://aka.ms/azsdk/dpcodegen/net
- https://aka.ms/azsdk/dpcodegen/python
- https://aka.ms/azsdk/dpcodegen/java
- https://aka.ms/azsdk/rlc/js
- https://aka.ms/azsdk/dpcodegen/js (do not use unless told to do so by the archboard)
At a glance, add your emitter name to your package.json
, along with the right options in the tspconfig.yaml
.
NOTE: Generating all languages from the same folder may be complicated due to the preview status of the emitters and TypeSpec libraries, such as
typespec-azure-core
andtypespec-azure-resource-manager
. It is recommended to have a unique language emitter in eachpackage.json
to avoid conflicts until all emitters and the TypeSpec libraries reach their first stable release.
Modify your package.json
to include the necessary dependencies for the language emitter(s). Remember to run npm install
after making changes to the file:
Always update your tspconfig.yaml
file rather than passing options through the command line.
Several language repositories utilize the tsp-client
tool to simplify generating client libraries. For more information on the tool, see Getting started with tsp-client
.