Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 23, 2025

  • Analyze all usages of LastContractView in the generator codebase
  • Identify all back compatibility scenarios supported by the generator
  • Create comprehensive documentation in packages/http-client-csharp/generator/docs/backward-compatibility.md
  • Include examples for each scenario
  • Validate documentation accuracy against code and tests
  • Address PR feedback and simplify documentation
  • Fix markdown formatting with prettier
  • Remove unsupported scenario based on team feedback
  • Update sub-headers to use "Scenario:" prefix without numbers

Summary

Created documentation for backward compatibility support in the TypeSpec C# generator. The document covers:

Supported Back-Compat Scenarios:

  1. Model Factory Methods

    • New model properties added - generates compatibility overload without new parameter
    • Parameter ordering changed - preserves previous parameter order
  2. Model Properties

    • Collection property type changes (ReadOnly ↔ ReadWrite) - attempts to preserve previous type
  3. API Version Enum

    • Removed/changed API versions - preserves previous enum members and re-indexes values

Recent Changes:

  • Updated sub-headers to use "Scenario:" prefix without numbers (e.g., "Scenario 1: New Model Property Added" → "Scenario: New Model Property Added")
  • Fixed markdown formatting by running prettier (adds proper blank lines before code blocks)
  • Removed "Model Factory Method Renamed" scenario as it's not actually supported by the generator

The documentation is located at /packages/http-client-csharp/generator/docs/backward-compatibility.md.

Original prompt

This section details on the original issue you should resolve

<issue_title>Create Document on All Back Compatibility Supported Scenarios</issue_title>
<issue_description>We should create a document that lists all of the supported back compat scenarios. Scan the generator repo to determine where the LastContractView is consumed, and what actions is the generator performing with. We should come up with a simple doc that lists the high level scenarios that it supports. In example, adding back parameters in model factory methods from previous releases.

This doc should live in https://github.com/microsoft/typespec/tree/main/packages/http-client-csharp/generator/docs</issue_description>

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

Fixes #8808


💡 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] Create document on all back compatibility supported scenarios Create documentation for backward compatibility supported scenarios Oct 23, 2025
Copilot finished work on behalf of jorgerangel-msft October 23, 2025 16:12
Copilot finished work on behalf of jorgerangel-msft October 23, 2025 16:24
Copilot finished work on behalf of jorgerangel-msft October 23, 2025 16:30
@jorgerangel-msft jorgerangel-msft marked this pull request as ready for review October 23, 2025 16:42
Copilot finished work on behalf of jorgerangel-msft October 24, 2025 15:35
Copilot finished work on behalf of jorgerangel-msft October 27, 2025 15:30
Copilot finished work on behalf of jorgerangel-msft October 27, 2025 15:56
@jorgerangel-msft jorgerangel-msft added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 71d587e Oct 27, 2025
28 checks passed
@jorgerangel-msft jorgerangel-msft deleted the copilot/create-back-compat-documentation branch October 27, 2025 16:55
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Document on All Back Compatibility Supported Scenarios

3 participants