Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save haolingdong-msft/070ee0bfc3aab9c6ea24b084ec06a734 to your computer and use it in GitHub Desktop.

Select an option

Save haolingdong-msft/070ee0bfc3aab9c6ea24b084ec06a734 to your computer and use it in GitHub Desktop.

TypeSpec Authoring Agent Quick Start

Set up

Copilot CLI Mode (Recommended)

  1. Install the GitHub Copilot CLI by following the official installation guide.
  2. Start copilot CLI session from the root folder of https://github.com/Azure/azure-rest-api-specs. Below screenshot is starting the session in VSCode terminal.
image
  1. In the current Copilot CLI session, input prompts

VSCode Agent Mode

  1. Open VSCode from the root folder of https://github.com/Azure/azure-rest-api-specs.
  2. Input prompts in the agent panel.
image

Sample prompts

API Versioning

  • "Add a new preview API version 2026-01-01-preview for widget resource manager"
  • "Add a new stable API version 2026-01-01 for widget resource manager"
  • "Change visibility of provisioningState to Read+Create in 2025-05-04-preview only"
  • "Change property age from required to optional for 2025-05-04-preview"

Resource Definitions

  • "Add an ARM resource named Asset with CRUD operations for widget resource manager"
  • "Add a child resource named Component under the Asset resource for widget resource manager"
  • "Add a proxy resource named Config under the Asset resource for widget resource manager"
  • "change resource Employee as extension resource"

Resource Operations

  • "Add a custom action restartAsset to the Asset resource for widget resource manager"
  • "Add an async/LRO operation to export data from the Asset resource for widget resource manager"
  • "Add a PATCH operation to the Asset resource for widget resource manager"
  • "Modify the LRO createOrUpdate PUT operation in interface employees so that it returns Azure-AsyncOperation header but NOT Retry-After header in the 201 response."
  • "Add 'top' and 'skip' query parameters to the ListBySubscription operation in interface employees"

Models & Types

  • "Add an enum named AssetStatus with values Active, Inactive, and Deprecated for widget resource manager"
  • "Add a new property tags to the Asset resource for widget resource manager" change visibility of provisioningState to Read+Create in 2025-05-04-preview only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment