Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 21, 2025

  • Analyze the issue: URI mismatch between main.tsp and mockapi.ts in alternate-type spec
  • Fix the URIs in mockapi.ts to use /azure/client-generator-core/alternate-type/external/ instead of /azure/client-generator-core/access/
  • Build and validate the changes
  • Test the changes to ensure consistency
  • Add changelog entry for the fix

Summary

Fixed the URI inconsistency in the alternate-type spec by correcting the mockapi.ts URIs to match the TypeSpec definition in main.tsp:

Before:

  • /azure/client-generator-core/access/model
  • /azure/client-generator-core/access/property

After:

  • /azure/client-generator-core/alternate-type/external/model
  • /azure/client-generator-core/alternate-type/external/property

The URIs now correctly reflect the service route (@scenarioService("/azure/client-generator-core/alternate-type")) combined with the namespace route (@route("/external")) and the individual operation routes.

A changelog entry has been added to document this bug fix.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug] inconsistency between main.tsp and mockapi.ts for spector case</issue_title>
<issue_description>We shall fix uri of https://github.com/Azure/typespec-azure/blob/c37dbe94004295397b45cfefc216e8952d616ea7/packages/azure-http-specs/specs/azure/client-generator-core/alternate-type/mockapi.ts to make it consistent with definition of https://github.com/Azure/typespec-azure/blob/c37dbe94004295397b45cfefc216e8952d616ea7/packages/azure-http-specs/specs/azure/client-generator-core/alternate-type/main.tsp</issue_description>

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

Fixes #3427


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Changed URIs from /azure/client-generator-core/access/ to /azure/client-generator-core/alternate-type/external/ to match the TypeSpec definition in main.tsp

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Fix inconsistency between main.tsp and mockapi.ts for spector case Fix URI inconsistency between main.tsp and mockapi.ts for alternate-type spec Oct 21, 2025
Copilot finished work on behalf of msyyc October 21, 2025 05:21
@Copilot Copilot AI requested a review from msyyc October 21, 2025 05:21
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot finished work on behalf of msyyc October 21, 2025 07:01
@Copilot Copilot AI requested a review from msyyc October 21, 2025 07:01
@msyyc msyyc enabled auto-merge October 21, 2025 07:05
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 22, 2025

Open in StackBlitz

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

commit: 15d2184

@msyyc msyyc added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit fd1910d Oct 22, 2025
22 checks passed
@msyyc msyyc deleted the copilot/fix-inconsistency-main-tsp-mockapi branch October 22, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] inconsistency between main.tsp and mockapi.ts for spector case

3 participants