Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Description

Migrates Azure.AI.Language.QuestionAnswering.Authoring from the legacy TypeSpec C# emitter (@azure-tools/typespec-csharp) to the new Azure generator (@azure-typespec/http-client-csharp).

Changes

  • tsp-location.yaml: Updated emitter path to eng/azure-typespec-http-client-csharp-emitter-package.json
  • csproj: Removed IncludeAutorestDependency, System.Text.Json reference, and AZC0012 suppression
  • Generated code: Regenerated via tsp-client update
  • Removed obsolete customizations: Deleted files using internal legacy generator attributes (CodeGenType, CodeGenModel, CodeGenSuppress)
  • Added workarounds for generator gaps:
    • ImportContentType.cs - Missing type referenced by generated convenience methods
    • ImportJobOptions.cs - Missing FileUri property
    • QuestionAnsweringAuthoringClientCustomizations.cs - Helper overloads for Import operations
  • Updated client customization: Removed legacy attributes, updated to use Pipeline property

All existing tests pass (25 passed, 9 skipped live tests).


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
  • The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.
Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate Azure.AI.Language.QuestionAnswering.Authoring to new generator</issue_title>
<issue_description>https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering.Authoring

See https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/documentintelligence/Azure.AI.DocumentIntelligence as an example.</issue_description>

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Migrate Azure.AI.Language.QuestionAnswering.Authoring to new generator Migrate Azure.AI.Language.QuestionAnswering.Authoring to new generator Dec 5, 2025
Copilot AI requested a review from JoshLove-msft December 5, 2025 03:37
Copilot finished work on behalf of JoshLove-msft December 5, 2025 03:37
Copy link
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 successfully migrates Azure.AI.Language.QuestionAnswering.Authoring from the legacy TypeSpec C# emitter to the new Azure generator (@azure-typespec/http-client-csharp). The migration updates the emitter path, regenerates code with the new generator, removes obsolete legacy customizations, and adds targeted workarounds for generator gaps.

Key Changes

  • Updated emitter configuration to use the new Azure TypeSpec generator
  • Removed legacy customization files using deprecated CodeGenModel, CodeGenType, and CodeGenSuppress attributes
  • Added workaround files (ImportContentType.cs, ImportJobOptions.cs, QuestionAnsweringAuthoringClientCustomizations.cs) to address generator gaps
  • Updated client to use Pipeline property instead of _pipeline field
  • Regenerated all models with new serialization patterns using _additionalBinaryDataProperties instead of _serializedAdditionalRawData

Reviewed changes

Copilot reviewed 12 out of 146 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsp-location.yaml Updated emitter package path and commit reference
QuestionAnsweringAuthoringClient.cs Changed _pipeline field to Pipeline property
QuestionAnsweringAuthoringClientCustomizations.cs Added helper overloads for Import operations
ImportContentType.cs New workaround for missing content type referenced by convenience methods
ImportJobOptions.cs Placeholder for missing FileUri property (workaround)
QuestionAnsweringAuthoringError*.cs Removed - now generated by new emitter
Generated/Models/* Regenerated with new serialization patterns and ResponseError instead of custom error types
Generated/QuestionAnsweringAuthoringClient.RestClient.cs New protocol layer implementation

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

API Change Check

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

Azure.AI.Language.QuestionAnswering.Authoring

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.

Migrate Azure.AI.Language.QuestionAnswering.Authoring to new generator

3 participants