-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ACS JobRouter][GA] Change discriminators to enum instead of string for all polymorphic base class #26658
Merged
weidongxu-microsoft
merged 10 commits into
Azure:main
from
sarkar-rajarshi:rsarkar/jobrouter/try-representing-discriminator-as-enum
Nov 14, 2023
Merged
[ACS JobRouter][GA] Change discriminators to enum instead of string for all polymorphic base class #26658
weidongxu-microsoft
merged 10 commits into
Azure:main
from
sarkar-rajarshi:rsarkar/jobrouter/try-representing-discriminator-as-enum
Nov 14, 2023
Conversation
This file contains 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
Next Steps to Merge✔️ All automated merging requirements have been met! Refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM). |
Swagger Generation Artifacts
|
Generated ApiView
|
sarkar-rajarshi
force-pushed
the
rsarkar/jobrouter/try-representing-discriminator-as-enum
branch
from
November 10, 2023 03:56
db1f6f8
to
c4458a5
Compare
AzureRestAPISpecReview
added
BreakingChangeReviewRequired
<valid label in PR review process>add this label when breaking change review is required
data-plane
labels
Nov 10, 2023
This was referenced Nov 10, 2023
…m' of https://github.com/sarkar-rajarshi/azure-rest-api-specs into rsarkar/jobrouter/try-representing-discriminator-as-enum
sarkar-rajarshi
requested review from
stewartadam and
weidongxu-microsoft
and removed request for
a team
November 10, 2023 18:33
JeffreyRichter
added
the
Approved-BreakingChange
DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374
label
Nov 13, 2023
@jhendrixMSFT this is ready to be merged |
weidongxu-microsoft
approved these changes
Nov 14, 2023
Breaking changes approved by Jeffrey. Change to client.tsp verified by the team. Change to example files are expected. |
Swagger pipeline restarted successfully, please wait for status update in this comment. |
sarkar-rajarshi
deleted the
rsarkar/jobrouter/try-representing-discriminator-as-enum
branch
November 14, 2023 02:07
This was referenced Nov 14, 2023
Closed
zman-ms
pushed a commit
that referenced
this pull request
Jan 10, 2024
…or all polymorphic base class (#26658) * change discriminators to enum instead of string * Mark list methods as internal * update examples * update typespec-ts option * update examples * Suppress DISCRIMINATOR_NOT_REQUIRED and INVALID_DISCRIMINATOR_TYPE * Update projected list method names for csharp * Revert * add missing package-dir in tspconfig --------- Co-authored-by: williamzhao87 <[email protected]> Co-authored-by: Mike Harder <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Approved-BreakingChange
DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374
Approved-Suppression
BreakingChangeReviewRequired
<valid label in PR review process>add this label when breaking change review is required
data-plane
SuppressionReviewRequired
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.
Based on reviews from Azure/azure-sdk#6852
It was recommended for the discriminator property used in polymorphic classes to be exposed as extensible enums. This introduces the following enums in the spec which are now used as discriminator type instead of
str
This is also the recommended representation of discriminators Teams post (internal)
JobMatchingModeKind
(used forJobMatchingMode.kind
)RouterRuleKind
(used forRouterRule.kind
)DistributionModeKind
(used forDistributionMode.kind
)ExceptionTriggerKind
(used forExceptionTrigger.kind
)ExceptionActionKind
(used forExceptionAction.kind
)QueueSelectorAttachmentKind
(used forQueueSelectorAttachment.kind
)WorkerSelectorAttachmentKind
(used forWorkerSelectorAttachment.kind
)Other changes:-
Previous PR: #25763
Breaking Change: Workitem