---
title: "Discussion on \"TypeSpec: API Design Before Code\" | Hashnode"
description: "Discussion on \"TypeSpec: API Design Before Code\". Most teams design APIs one of two ways: write code first and extract OpenAPI from annotations, or write OpenAPI YAML directly and generate types from it. Both have the same problem — you end up maintaining two things (schema + code) that need to stay..."
url: "https://hashnode.com/posts/typespec-api-design-before-code/69a826b6187dd2342a00373d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [TypeSpec: API Design Before Code](https://devtoolsguide.hashnode.dev/typespec-api-design-before-code?utm_source=hashnode&utm_medium=feed)

Most teams design APIs one of two ways: write code first and extract OpenAPI from annotations, or write OpenAPI YAML directly and generate types from it. Both have the same problem — you end up maintaining two things (schema + code) that need to stay...

Mar 4 · 4 min read · devtoolsguide.hashnode.dev  
Read the article

-   [#api-design](https://hashnode.com/tag/api-design)
-   [#code-generation](https://hashnode.com/tag/code-generation)
-   [#microsoft](https://hashnode.com/tag/microsoft)
-   [#openapi](https://hashnode.com/tag/openapi)
-   [#typespec](https://hashnode.com/tag/typespec)

## Written by

[DevTools Guide](https://hashnode.com/@devtoolsguide)

@devtoolsguide · Seattle, WA

  
[View profile](https://hashnode.com/@devtoolsguide)

TypeScript, developer tools, and web development insights. Practical guides for modern devs.

Practical guides for developers: TypeScript, developer tools, CI/CD, and modern web development. We cover the tools that make devs more productive.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
