Stream: dev

Topic: TypeSpec for designing APIs


view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 25 2025 at 13:25):

I was listening to a talk yesterday and heard about tool called TypeSpec: https://typespec.io

The idea is to write your OpenAPI file before you write any code. But OpenAPI can be a little verbose so a tool like TypeSpec allows you to write in a more compact, human-readable way and then convert it to OpenAPI.

Then you send around your OpenAPI doc for feedback. Once it's approved, you start writing code.

view this post on Zulip Jan Range (Sep 26 2025 at 15:04):

Interesting! I thought the typical workflow is to derive from the actual implementation, but this is much cleaner.

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 26 2025 at 15:04):

Well, you can certainly write the code first. :smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 26 2025 at 15:05):

In the talk the guy says the developers get grumpy when they write a bunch of code, submit their OpenAPI doc for review, and then get told to change a bunch of stuff. :smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 26 2025 at 15:07):

Also, he was saying when you use TypeSpec you might write 500 lines of code that translate into 5000 lines of OpenAPI code (doc). 10x.

view this post on Zulip Jan Range (Sep 26 2025 at 17:50):

True, that makes a lot of sense and I think at the end it is way cleaner.

view this post on Zulip Jan Range (Sep 26 2025 at 17:51):

Shall we draft a subset for Dataverse at some point to test it?

view this post on Zulip Philip Durbin ๐Ÿš€ (Sep 26 2025 at 17:58):

Well, this is related:

Write Dataverse API v2 proposal and share with communityย #11836


Last updated: Jan 09 2026 at 14:18 UTC