[http-client-csharp] Build discriminated base description from discriminated base type, not abstract modifier - #11412
Merged
jorgerangel-msft merged 6 commits intoJul 27, 2026
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
…scriminated base type, not abstract modifier Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update discriminator message handling for base types
[http-client-csharp] Build discriminated base description from discriminated base type, not abstract modifier
Jul 27, 2026
commit: |
… and bespoke test provider Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…WhenNotAbstract test Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…ated base type is not abstract Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
jorgerangel-msft
left a comment
Contributor
There was a problem hiding this comment.
@copilot ensure we regenerate all the test libraries and all tests are passing
… for abstract and non-abstract Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Contributor
Author
Regenerated all test libraries via
|
jorgerangel-msft
approved these changes
Jul 27, 2026
jorgerangel-msft
left a comment
Contributor
There was a problem hiding this comment.
regen preview: Azure/azure-sdk-for-net#61407
jorgerangel-msft
marked this pull request as ready for review
July 27, 2026 20:15
jorgerangel-msft
requested review from
JoshLove-msft,
joseharriaga,
jsquire and
m-nash
as code owners
July 27, 2026 20:15
jorgerangel-msft
enabled auto-merge
July 27, 2026 20:15
JoshLove-msft
approved these changes
Jul 27, 2026
jorgerangel-msft
deleted the
copilot/http-client-csharp-discriminator-message-update
branch
July 27, 2026 21:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The discriminator "Please note this is the abstract base class..." description was only emitted when a model carried the
Abstractdeclaration modifier. Whether a discriminated base type is modeled as abstract is an implementation detail — downstream emitters (e.g. provisioning) may not declare it abstract, causing the derived-classes note to be dropped.Changes
ModelProvider: AddedIsDiscriminatedBaseTypehelper — a model with a discriminator property but no discriminator value.BuildDescription: Gates the derived-classes note onIsDiscriminatedBaseTypeinstead of theAbstractmodifier, decoupling documentation from abstractness.BuildDeclarationModifiers: Reuses the same helper for the abstract decision, keeping the base emitter's behavior unchanged.DiscriminatedBaseDescriptionIsBuiltEvenWhenNotAbstract, using aModelProvidersubclass that stripsAbstractto mimic a downstream emitter and asserting the note is still built.