Skip to content

TypeSpec Conversion

Mike Harder edited this page Jul 3, 2024 · 9 revisions

UNDER CONSTRUCTION

TypeSpec Conversion

Short link: aka.ms/typespec/conversion

Overview

  1. Identify the OpenAPI spec version to convert

    • Must be newest version for which SDKs have been generated, regardless of whether it was a stable or preview version
  2. Choose a new preview version for your converted OpenAPI (e.g. preview/2024-07-01-preview)

  3. Create a folder for your TypeSpec sources, per the TypeSpec Structure Guidelines.

  4. 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
  1. Update the version in the generated TypeSpec, to the version from step 2.

  2. Compile the generated TypeSpec:

$ npx tsp compile .
  1. Add all new files to a branch.

  2. 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.

Links

Overview

TypeSpec

Engineering System

Meta

Under Construction

Clone this wiki locally