Short link: aka.ms/typespec/conversion
Identify the OpenAPI spec version to convert
stable
preview
Choose a new preview version for your converted OpenAPI (e.g. preview/2024-07-01-preview)
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.
Удаление страницы вики «TypeSpec Conversion» не может быть отменено. Продолжить?