Compare nested Relationship endpoint model shape#4893
Draft
alexchro93 wants to merge 2 commits into
Draft
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8a6e07d6-3bd4-4373-b9a2-88ad69127fcf
Move relationship source and target details into nested endpoint models so source/target identifiers, types, and target tenant are grouped together. Keep RelationshipMetadata for RP-defined metadata and update linter validation, docs, and sample output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4adc4a5f-101a-4e32-9be7-e1525b252f8a
Contributor
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
The following packages have already been documented:
Show changes
|
commit: |
Contributor
|
You can try these changes here
|
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.
Summary
This draft PR is an alternate implementation of #4892 for comparison. It keeps the same experimental ARM Relationship base type feature, but models relationship endpoints as nested objects instead of flat properties.
The resulting relationship properties shape is:
Where endpoint-specific details live under the endpoint objects:
{ "source": { "id": "...", "type": "..." }, "target": { "id": "...", "type": "...", "tenant": "..." }, "metadata": {} }Notable differences from #4892
sourceId,targetId, andtargetTenantwithsourceandtargetobject properties.RelationshipMetadataintosource.typeandtarget.type.RelationshipMetadatafor RP-defined relationship metadata.Validation
pnpm -r --filter "@azure-tools/typespec-azure-resource-manager..." buildpnpm --filter @azure-tools/typespec-azure-resource-manager test -- arm-relationship-base-type-required-propertiespnpm --filter @azure-tools/typespec-samples test:regen -- -t relationshippnpm --filter @azure-tools/typespec-samples test -- -t relationshipgit diff --check