Introduction
TypeSpec is a language for describing cloud service APIs and generating other API description languages, client and service code, documentation, and other assets. TypeSpec provides highly extensible core language primitives that can describe API shapes common among REST, GraphQL, gRPC, and other protocols.
You can find more information at https://typespec.io/docs.
This site is focused on using TypeSpec in the context of Azure. We have published a set of libraries with standard patterns and templates to make defining Azure management and data-plane services easy and compliant with Azure API guidelines. Using these building blocks and guard rails, your service API will be easier to build, will have an easier time passing API reviews, will be consistent with other Azure services, and will produce good API documentation, good SDKs, and good CLIs. TypeSpec can emit the following artifacts for your service:
- OpenAPI3 specs
- OpenAPI2 specs, suitable for check-in in to the azure-rest-api-specs repo
TypeSpec Azure Libraries
Packages
Name | Type | Changelog | Latest | Next |
---|---|---|---|---|
@azure-tools/typespec-azure-core | Library | Changelog | ||
@azure-tools/typespec-resource-manager | Library | Changelog | ||
@azure-tools/typespec-autorest | Emitter | Changelog |
@next
version of the package are the latest versions available on the main
branch.
Package Layering
The main packages in this repository can be considered a series of layers which progressively add functionality for specific scenarios:
- @azure-tools/typespec-azure-core: Provides core models and interfaces for Azure service modelling
- @azure-tools/typespec-azure-resource-manager: Provides additional models and interfaces for modelling Azure Resource Manager services
How to Get Help
- Ask questions in the TypeSpec Discussions Channel
- File issues in the typespec-azure github repo
- For bugs, please include:
- A high-level description of the bug
- Expected and Actual Results
- Repro steps, including any TypeSpec code that you used
- Any error messages you saw, including stack traces. For issues with VS or VS Code tooling see Troubleshooting VSCode Tooling and Filing Issues
- For bugs, please include:
More Information About TypeSpec
Some additional sources: