Skip to content
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

x-ms-identifiers alternatives #1983

Merged
merged 21 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8e8eac8
introduce identifiers decorator and recognize key as identifiers
AlitzelMendez Dec 12, 2024
5a3b5d6
summary of changes
AlitzelMendez Dec 12, 2024
9e3e0d8
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Dec 12, 2024
9be6ae0
avoid adding x-ms-identifiers unexpected
AlitzelMendez Dec 16, 2024
d7cce7a
update examples with x-ms-identifiers comming from keys
AlitzelMendez Dec 17, 2024
131d8ef
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Dec 17, 2024
28c371d
missing identifiers on openapi.json files
AlitzelMendez Dec 17, 2024
db897fd
Merge branch 'x-ms-identifiers-alternatives' of https://github.com/Al…
AlitzelMendez Dec 17, 2024
f37457e
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Dec 26, 2024
37fcd7a
Feedback: id/name are default keys so no need to show them or trigger…
AlitzelMendez Dec 26, 2024
170f819
Update packages/typespec-azure-resource-manager/src/lib.ts
AlitzelMendez Dec 26, 2024
ed89e10
Add more documentation
AlitzelMendez Dec 26, 2024
8a6684d
fix test & more docs
AlitzelMendez Dec 26, 2024
4f358d2
Merge branch 'x-ms-identifiers-alternatives' of https://github.com/Al…
AlitzelMendez Dec 26, 2024
d8ade8c
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Jan 3, 2025
c3086cc
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Jan 6, 2025
c580cf2
Documentation
AlitzelMendez Jan 7, 2025
3d6a152
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Jan 8, 2025
92ffae6
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Jan 9, 2025
cd50b98
fix typo
AlitzelMendez Jan 10, 2025
173cef7
Merge branch 'main' into x-ms-identifiers-alternatives
AlitzelMendez Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-autorest"
- "@azure-tools/typespec-azure-resource-manager"
---

Use the @identifiers decorator to identify and utilize identifiers for x-ms-identifiers. Additionally, use the @key decorator to identify identifiers.
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,10 @@
"description": "The Manufacturer items on this page",
"items": {
"$ref": "#/definitions/Manufacturer"
}
},
"x-ms-identifiers": [
"id"
AlitzelMendez marked this conversation as resolved.
Show resolved Hide resolved
]
},
"nextLink": {
"type": "string",
Expand All @@ -1210,7 +1213,9 @@
"items": {
"$ref": "#/definitions/Widget"
},
"x-ms-identifiers": []
"x-ms-identifiers": [
AlitzelMendez marked this conversation as resolved.
Show resolved Hide resolved
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,9 @@
"items": {
"$ref": "#/definitions/Widget"
},
"x-ms-identifiers": []
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,10 @@
"description": "The Manufacturer items on this page",
"items": {
"$ref": "#/definitions/Manufacturer"
}
},
"x-ms-identifiers": [
"id"
]
},
"nextLink": {
"type": "string",
Expand All @@ -1114,7 +1117,9 @@
"items": {
"$ref": "#/definitions/Widget"
},
"x-ms-identifiers": []
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,10 @@
"description": "The Manufacturer items on this page",
"items": {
"$ref": "#/definitions/Manufacturer"
}
},
"x-ms-identifiers": [
"id"
]
},
"nextLink": {
"type": "string",
Expand All @@ -1210,7 +1213,9 @@
"items": {
"$ref": "#/definitions/Widget"
},
"x-ms-identifiers": []
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,10 @@
"description": "The Manufacturer items on this page",
"items": {
"$ref": "#/definitions/Manufacturer"
}
},
"x-ms-identifiers": [
"id"
]
},
"nextLink": {
"type": "string",
Expand All @@ -2108,7 +2111,9 @@
"items": {
"$ref": "#/definitions/Widget"
},
"x-ms-identifiers": []
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand All @@ -2130,7 +2135,9 @@
"items": {
"$ref": "#/definitions/WidgetPart"
},
"x-ms-identifiers": []
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,10 @@
"description": "The AllPropertiesResource items on this page",
"items": {
"$ref": "#/definitions/AllPropertiesResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -2118,7 +2121,10 @@
"description": "The TestExtensionResource items on this page",
"items": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestExtensionResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -2161,7 +2167,10 @@
"description": "The TestTenantResource items on this page",
"items": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestTenantResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -2204,7 +2213,10 @@
"description": "The TestTrackedChild items on this page",
"items": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestTrackedChild"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand All @@ -2225,7 +2237,10 @@
"description": "The TestTrackedResource2 items on this page",
"items": {
"$ref": "#/definitions/Microsoft.OperationsTest.TestTrackedResource2"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand All @@ -2246,7 +2261,10 @@
"description": "The TestTrackedResource items on this page",
"items": {
"$ref": "#/definitions/Microsoft.InterfacesTest.TestTrackedResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@
"description": "The Employee items on this page",
"items": {
"$ref": "#/definitions/Employee"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,10 @@
"description": "The WidgetResource items on this page",
"items": {
"$ref": "#/definitions/WidgetResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,10 @@
"description": "The Employee items on this page",
"items": {
"$ref": "#/definitions/Employee"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@
"description": "The WidgetResource items on this page",
"items": {
"$ref": "#/definitions/WidgetResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,10 @@
"description": "The WidgetResource items on this page",
"items": {
"$ref": "#/definitions/WidgetResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,10 @@
"description": "The WidgetResource items on this page",
"items": {
"$ref": "#/definitions/WidgetResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,10 @@
"description": "The PrivateEndpointConnectionResource items on this page",
"items": {
"$ref": "#/definitions/PrivateEndpointConnectionResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -704,7 +707,10 @@
"description": "The PrivateLinkResource items on this page",
"items": {
"$ref": "#/definitions/PrivateLinkResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -769,7 +775,10 @@
"description": "The TestTrackedResource items on this page",
"items": {
"$ref": "#/definitions/TestTrackedResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,10 @@
"description": "The PrivateEndpointConnectionResource items on this page",
"items": {
"$ref": "#/definitions/PrivateEndpointConnectionResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -704,7 +707,10 @@
"description": "The PrivateLinkResource items on this page",
"items": {
"$ref": "#/definitions/PrivateLinkResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -769,7 +775,10 @@
"description": "The TestTrackedResource items on this page",
"items": {
"$ref": "#/definitions/TestTrackedResource"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,10 @@
"description": "The RoleAssignment items on this page",
"items": {
"$ref": "#/definitions/RoleAssignment"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,10 @@
"description": "The Employee items on this page",
"items": {
"$ref": "#/definitions/Employee"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,10 @@
"description": "The Dependent items on this page",
"items": {
"$ref": "#/definitions/Dependent"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down Expand Up @@ -859,7 +862,10 @@
"description": "The Employee items on this page",
"items": {
"$ref": "#/definitions/Employee"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@
"description": "The Employee items on this page",
"items": {
"$ref": "#/definitions/Employee"
}
},
"x-ms-identifiers": [
"name"
]
},
"nextLink": {
"type": "string",
Expand Down
Loading
Loading