CodeGen based on OpenApi/Swagger Spec #10304
-
|
Scenario: We already have a well defined API in .net and OpenAPI/Swagger Spec is already generated for us by this API. We simply want to generate client using OpenAPI/Swagger Spec. I understand we have Kiota for this purpose, and TypeSpec also generates clients. However, key difference being in TypeSpec we have to define our API first to generate OpenAPI Spec and then generate client from it. Question: Is it possible in TypeSpec to simply generate client without the need to define API spec again? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
No this is not possible, the goal of TypeSpec is to work in an API first approach so this is a non-goal. |
Beta Was this translation helpful? Give feedback.
No this is not possible, the goal of TypeSpec is to work in an API first approach so this is a non-goal.
We have a converter that allows you to migrate to TypeSpec from an openapi spec but note that this only meant to be a one-time migration and is in no way meant to produce consistent result over time (Breaking change to produce a more accurate TypeSpec will happen)