Skip to content

Add multi-service tests for older API versions and shared models#3713

Merged
iscai-msft merged 9 commits intomainfrom
copilot/add-more-tests-multiple-services
Jan 6, 2026
Merged

Add multi-service tests for older API versions and shared models#3713
iscai-msft merged 9 commits intomainfrom
copilot/add-more-tests-multiple-services

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

Plan: Add More Tests for Multiple Services

Test 1: multi-service-older-versions

  • Create directory packages/azure-http-specs/specs/azure/resource-manager/multi-service-older-versions
  • Create service1.tsp with versioned Compute service (using older version references)
  • Create service2.tsp with versioned Disk service (using older version references)
  • Create client.tsp that combines both services using older versions
  • Create mockapi.ts with mock implementations
  • Validate scenarios and mock APIs
  • Fix client syntax to use @useDependency instead of version property
  • Add version-specific properties (size for VirtualMachine, diskSizeGB for Disk) to distinguish old vs new versions

Test 2: multi-service-shared-models

  • Create directory packages/azure-http-specs/specs/azure/resource-manager/multi-service-shared-models
  • Create shared-models.tsp with common models used by both services
  • Create service1.tsp with Compute service using shared models
  • Create service2.tsp with Storage service using shared models
  • Create client.tsp that combines both services
  • Create mockapi.ts with mock implementations
  • Validate scenarios and mock APIs
  • Remove unused SharedErrorInfo model
  • Add proper namespace definition to shared models

Validation & Formatting

  • Run pnpm validate-scenarios to ensure specs are valid
  • Run pnpm validate-mock-apis to ensure mock APIs are valid
  • Build the package to ensure everything compiles
  • Run code formatting
  • Code review completed with no issues
  • Address all review comments
  • Add changeset using chronus
Original prompt

This section details on the original issue you should resolve

<issue_title>[Spector] Add more tests for multiple services</issue_title>
<issue_description>Add two tests under packages/azure-http-specs/specs/azure/resource-manager:

  1. A test that similar to https://github.com/Azure/typespec-azure/tree/main/packages/azure-http-specs/specs/azure/resource-manager/multi-service, but the combined client use older version of two services.
  2. A test that similar to https://github.com/Azure/typespec-azure/tree/main/packages/azure-http-specs/specs/azure/resource-manager/multi-service, but two services have shared models.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 5, 2026 07:52
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copilot AI changed the title [WIP] Add more tests for multiple services in Azure HTTP specs Add multi-service tests for older API versions and shared models Jan 5, 2026
Copilot AI requested a review from tadelesh January 5, 2026 08:11
Copy link
Member

@tadelesh tadelesh left a comment

Choose a reason for hiding this comment

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

@copilot Resolve the comments.

…erties, remove unused model

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copilot AI requested a review from tadelesh January 5, 2026 08:51
Copy link
Member

@tadelesh tadelesh left a comment

Choose a reason for hiding this comment

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

@copilot Use pnpm -w change add to add changeset.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 5, 2026

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/azure-http-specs@3713

commit: 7194a7b

Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot Use pnpm -w change add to add changeset.

Added changeset in commit 66217cc. Created .chronus/changes/add-multi-service-tests-2026-01-05-08-56-40.md with changeKind: internal for @azure-tools/azure-http-specs package.

Copilot AI requested a review from tadelesh January 5, 2026 08:58
@tadelesh tadelesh marked this pull request as ready for review January 5, 2026 10:05
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Copilot AI requested a review from tadelesh January 6, 2026 02:18
@iscai-msft iscai-msft added this pull request to the merge queue Jan 6, 2026
Merged via the queue into main with commit cdff797 Jan 6, 2026
22 checks passed
@iscai-msft iscai-msft deleted the copilot/add-more-tests-multiple-services branch January 6, 2026 21:56
@timotheeguerin timotheeguerin added the lib:azure-http-specs For issues/prs related to the @azure-tools/typespec-azure-http-specs package label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib:azure-http-specs For issues/prs related to the @azure-tools/typespec-azure-http-specs package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Spector] Add more tests for multiple services

7 participants