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

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
    • Factory method renamed - generates compatibility method with old name
  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:

  • Fixed markdown formatting by running prettier (adds proper blank lines before code blocks)

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
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.

Create Document on All Back Compatibility Supported Scenarios

2 participants