# microsoft/typespec

Repository: https://github.com/microsoft/typespec
Canonical: https://ross.abutalabs.com/products/typespec
Homepage: https://typespec.io/
Language: Java
License: MIT
License Family: permissive
Topics: openapi3, json-schema, protobuf, typespec
Last push: 2026-08-26T23:30:29+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 85, longevity 100
- inputs: {"age_days": 1890, "days_push": 7, "days_rel": 22, "gap_med": 0, "n_releases_24m": 368}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5832, forks 387 (observed 2026-08-28T04:09:30.184134+00:00)

## What it is
TypeSpec is a Microsoft-built, extensible DSL and toolchain for defining cloud service APIs and data shapes as a single source of truth. It compiles TypeSpec definitions into OpenAPI 3, JSON Schema, Protobuf, client/server code, and documentation via an emitter framework, with editor extensions, a linter framework, and a formatter.

## Use cases
- generate openapi spec from a single api definition
- define rest api schema once and emit multiple formats
- generate json schema for data validation
- design api contracts with reusable patterns and guardrails
- replace hand-written openapi yaml with a typed language
- generate protobuf definitions from api models
- lint api designs for anti-patterns

## When to choose
- you maintain OpenAPI/JSON Schema specs across many services and want one source of truth
- you want reusable, versioned API design patterns enforced across teams
- you need to emit multiple API description formats from a single definition

## When to avoid
- you have a single small API and a plain OpenAPI YAML file works fine
- your team has no appetite for learning a new DSL
- you need formats with no existing TypeSpec emitter

## Facets
- artifact type: framework
- maturity: active
- function: api-framework, linter, formatter, serialization, developer-tools
- domain: apis, web-development, developer-tools, documentation
- platform: cross-platform, cli, editor-plugin
- tags: api-design, openapi, json-schema, protobuf, dsl, code-generation, single-source-of-truth, microsoft, nodejs

## Member repositories
- microsoft/typespec (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:30.184134+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:52:04.431701+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/typespec (fetched 2026-08-28T04:09:30.184134+00:00, sha 5dee0090184e)
  - homepage: https://typespec.io/ (fetched 2026-08-29T08:47:34.456319+00:00, sha 71f1bbad5b1f)
  - site_page: https://typespec.io/docs (fetched 2026-08-29T08:47:34.465544+00:00, sha 9578f1f74f6e)
  - site_page: https://typespec.io/docs/getting-started/typespec-for-openapi-dev (fetched 2026-08-29T08:47:34.467465+00:00, sha 7aaa4c78b5a5)
  - site_page: https://typespec.io/docs/extending-typespec/basics (fetched 2026-08-29T08:47:34.475155+00:00, sha a757b3122d2c)
  - site_page: https://typespec.io/openapi (fetched 2026-08-29T08:47:34.469940+00:00, sha 4158fd14763a)
  - site_page: https://typespec.io/data-validation (fetched 2026-08-29T08:47:34.471932+00:00, sha 6f0f60319415)
  - site_page: https://typespec.io/tooling (fetched 2026-08-29T08:47:34.473583+00:00, sha 91afb77a7126)
- Data as of 2026-08-30T08:39:29.467469+00:00.
