Skip to content

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

NameTypeChangelogLatestNext
@azure-tools/typespec-azure-coreLibraryChangelog
@azure-tools/typespec-resource-managerLibraryChangelog
@azure-tools/typespec-autorestEmitterChangelog

@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:

How to Get Help

More Information About TypeSpec

Some additional sources: