-
Notifications
You must be signed in to change notification settings - Fork 5.1k
TypeSpec Conversion
Mike Harder edited this page Jul 3, 2024
·
9 revisions
Short link: aka.ms/typespec/conversion
-
Identify the OpenAPI spec version to convert
- Must be newest version for which SDKs have been generated, regardless of whether it was a
stable
orpreview
version
- Must be newest version for which SDKs have been generated, regardless of whether it was a
-
Choose a new preview version for your converted OpenAPI (e.g.
preview/2024-07-01-preview
) -
Create a folder for your TypeSpec sources, per the TypeSpec Structure Guidelines.
-
In this folder, run the conversion tool:
$ npx @azure-tools/typespec-client-generator-cli convert --swagger-readme ../data-plane/readme.md
OR
$ npx @azure-tools/typespec-client-generator-cli convert --swagger-readme ../resource-manager/readme.md --arm
-
Update the version in the generated TypeSpec, to the version from step 2.
-
Compile the generated TypeSpec:
$ npx tsp compile .
-
Add all new files to a branch.
-
Iterate on your TypeSpec and generated swagger. Create a draft PR, to run checks that will guide you to get your PR ready to merge.