Skip to content

Migrate Devtestlabs to generate from TypeSpec#53452

Merged
ArthurMa1978 merged 50 commits intomainfrom
devtestlabs
Feb 25, 2026
Merged

Migrate Devtestlabs to generate from TypeSpec#53452
ArthurMa1978 merged 50 commits intomainfrom
devtestlabs

Conversation

@ArthurMa1978
Copy link
Copy Markdown
Member

@ArthurMa1978 ArthurMa1978 commented Oct 23, 2025

Fixes #54747
Spec PR: Azure/azure-rest-api-specs#38481

Continue work of #51337

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

@github-actions github-actions bot added the Mgmt This issue is related to a management package. label Oct 23, 2025
@ArthurMa1978 ArthurMa1978 marked this pull request as ready for review October 23, 2025 08:30
Copilot AI review requested due to automatic review settings October 23, 2025 08:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the DevTestLabs SDK to generate from TypeSpec by updating the autorest configuration. The primary change is updating the OpenAPI specification reference to a newer commit and adding extensive swagger transformation directives to handle property definitions and parameter descriptions.

Key Changes:

  • Updated the OpenAPI specification reference to a newer commit (471eab6)
  • Removed an unused rename mapping for WindowsOSState
  • Added multiple swagger transformation directives to remove additionalProperties from various definitions and standardize parameter descriptions

…ndowsOSState name

- Fix generator bug: parent detection now uses longest prefix match
  instead of first match, ensuring child resources are placed on the
  most specific parent (e.g., ServiceFabricSchedule on ServiceFabric
  instead of Lab)
- Remove RP prefix from WindowsOSState in spec client.tsp
- Regenerate with local generator to produce correct resource hierarchy
- All ApiCompat errors resolved, build passes with 0 errors
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 11, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Azure.ResourceManager.DevTestLabs

Copy link
Copy Markdown
Member

@live1206 live1206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should just remove autorest.md

Copy link
Copy Markdown
Member

@ArcturusZhang ArcturusZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mgmt SDK Review - DevTestLabs TypeSpec Migration

What Passes Review

  • Version 1.2.0-beta.1 with ApiCompatVersion 1.1.1 no major version bump
  • Zero API surface lines removed no breaking signature changes
  • All existing type names preserved for backward compatibility
  • PATCH model naming follows [Model]Patch convention
  • Content model naming follows [Model]Content convention
  • Enum types use singular names
  • New DevTestLabVhd type and GetDevTestLabVhds methods properly added
  • New model factory methods for mocking support
  • Customization files well-structured with backward compat comments
  • tsp-location.yaml correctly configured

Pre-existing Issues (preserved for backward compat, no action needed)

  • DevTestLabCostDetails.On poor DateTimeOffset property name (just "On")
  • DisallowPublicIPAddress boolean without Is/Can/Has prefix
  • DevTestLabScheduleCreationParameter "Parameter" suffix

Issues Found (see inline comment + notes below)

[Should Fix] CHANGELOG.md is empty for a TypeSpec migration with new APIs.

The CHANGELOG for v1.2.0-beta.1 has no entries. This release should document at minimum:

  • Features Added: DevTestLabVhd type and GetDevTestLabVhds/GetDevTestLabVhdsAsync methods, model factory methods for Patch/Content types
  • Breaking Changes: GetVhds/GetVhdsAsync now throws NotSupportedException (if kept as-is)
  • Other Changes: Migrated to TypeSpec-based code generation

[Should Fix] IncludeAutorestDependency in csproj should be removed.

src/Azure.ResourceManager.DevTestLabs.csproj line 10 has <IncludeAutorestDependency>true</IncludeAutorestDependency>. Since this package has been migrated to TypeSpec (tsp-location.yaml exists), the AutoRest dependency is no longer needed and should be removed.

@ArthurMa1978 ArthurMa1978 merged commit bae4231 into main Feb 25, 2026
22 checks passed
@ArthurMa1978 ArthurMa1978 deleted the devtestlabs branch February 25, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MPG migration - devtestlabs

4 participants