typespec icon indicating copy to clipboard operation
typespec copied to clipboard

Import OpenAPI 3 Spec to start writing the Spec in TypeSpec?

Open tobiashochguertel opened this issue 2 years ago • 2 comments

Is there a feature planned to import an existing OpenAPI 3 Specification and produce a TypeSpec Specification from it? I have several OpenAPI 3 Specs which I would like to migrate to TypeSpec without the need to start all over again.

tobiashochguertel avatar Feb 24 '24 13:02 tobiashochguertel

@tobiashochguertel I was wondering the same thing.

In case it helps, I found this plugin for Microsoft Azure's autorest that got me part of the way there and might help you as well: https://www.npmjs.com/package/@autorest/openapi-to-typespec

I needed to install autorest to use it: https://github.com/Azure/autorest/blob/main/docs/install/readme.md

jceipek avatar May 23 '24 21:05 jceipek

This exists, as described here: https://typespec.io/docs/emitters/openapi3/cli

markcowl avatar Jul 24 '24 21:07 markcowl