TypeSpec
TypeSpec is an API description language developed by Microsoft for defining API shapes that compile to OpenAPI, JSON Schema, Protobuf, and other output formats. It provides a language and toolchain for describing REST APIs, gRPC services, and data schemas in a type-safe, composable way with built-in support for versioning, metadata, and extensibility via decorators and libraries.
APIs
TypeSpec Compiler
The TypeSpec compiler processes `.tsp` TypeSpec files and emits output for configured emitters (OpenAPI, JSON Schema, Protobuf, etc.). It provides a programmatic Node.js/TypeScr...
TypeSpec OpenAPI Emitter
The TypeSpec OpenAPI emitter converts TypeSpec definitions to OpenAPI 3.0 specifications. It supports HTTP operations, request/response bodies, security schemes, and API version...
TypeSpec JSON Schema Emitter
Emits JSON Schema documents from TypeSpec model definitions, enabling data validation and type documentation workflows.
TypeSpec Protobuf Emitter
Emits Protocol Buffer `.proto` files from TypeSpec service definitions, enabling gRPC service generation from a single TypeSpec source.
TypeSpec HTTP Library
The TypeSpec HTTP library provides decorators and types for describing HTTP REST APIs including routes, operations, request bodies, query parameters, headers, and response codes.
TypeSpec REST Library
The TypeSpec REST library provides decorators for REST API patterns including resource operations (CRUD), collection operations, and standardized error response shapes.