getting started with typespec

preview_player
Показать описание
typespec is a new language for designing your API specifications upfront programmatically. typespec is a typescript style language that dramatically simplifies designing api's through support of inheritance, templates, interfaces and operations. using typespec you can take your simple api model design and generate openspec api 3.0 (swagger) definitions from it. In the future i see this being a key tool for generative ai to generate api's also.

In this video chris walkthrough how to get started with typespec and why its important.
Рекомендации по теме
Комментарии
Автор

Great video! I'm the PM for TypeSpec at MS, from the comments it looks like there is interest in back-end code generation from TypeSpec, which we're currently working on.

marioguerratwo
Автор

Awesome video. The question is now how to use the typespec to implement typesafe apis in typescript without having to rewrite the spec in typescript

JohnMcclaned
Автор

Hello Chris! Do you have an idea what i need to do in VSC to see the real time Swagger on the side interface? Saw this a lot of times but don't know how to do it

sorryforwhat
Автор

Chris, I really enjoyed the video thanks. My world is C/C++ and Java and recently Python. I managed for follow the video well but was lucky I had the node stuff installed on my laptop.
What would be interesting to me is how to now implement a simple back-end service in Python (or Java) that exposes the APIs you have defined and something simple (out of my knowledge base) on the front-end to interact with the API. My suggestion would be something like a very simple chat-response from a local LLM.

johntdavies
Автор

Having a painless way to hook up the generated spec with a c# solution to generate the models. Then all I have to do is define and implement the minimal api endpoints. Probably some convoluted way to do this with kiota/nswag

EvekoShadow
Автор

Having written spec manually in order to use with Swagger, I can see that it is a pain to do, but I did so in JSON to avoid YAML & I think that is a lot easier (why do we need YAML, when TOML exists.. but anyway)

If this could then create the routes for me, it would be a significant benefit, but otherwise I am learning all those decorators, various imports, namespaces and using statements, having to compile for each change etc, when I could have just written myself manually, right..

Good video, even if I'm not convinced on it ☺️

everyhandletaken