Skip to content

Commit

Permalink
Azure Page type nextLink properties should be readOnly: true (#231
Browse files Browse the repository at this point in the history
)

This PR fixes https://github.com/Azure/typespec-azure-pr/issues/3924 by
marking `nextLink` properties with `@visibility("read")` so that the
OpenAPI output for these properties contains `readOnly: true`.

---------

Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
  • Loading branch information
daviwil and timotheeguerin authored Mar 1, 2024
1 parent 54f5a32 commit 9b6e252
Show file tree
Hide file tree
Showing 46 changed files with 216 additions and 93 deletions.
8 changes: 8 additions & 0 deletions .chronus/changes/next-link-read-only-2024-1-28-21-59-17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@azure-tools/typespec-azure-core"
---

Azure `Page` type `nextLink` properties are now marked as `readonly`
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1132,7 +1133,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Manufacturer items
PagedWidget:
type: object
Expand All @@ -851,6 +852,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Widget items
RepeatabilityResult:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Widget items
RepeatabilityResult:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -2059,7 +2060,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of ModelSummary items
PagedOperationInfo:
type: object
Expand All @@ -1415,6 +1416,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of OperationInfo items
SelectionMarkState:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1213,7 +1214,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1235,7 +1237,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1257,7 +1260,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Deployment items
PagedProject:
type: object
Expand All @@ -916,6 +917,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Project items
PagedSupportedLanguage:
type: object
Expand All @@ -931,6 +933,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: A collection of SupportedLanguage resources.
PagedTrainingConfigVersion:
type: object
Expand All @@ -946,6 +949,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: A collection of TrainingConfigVersion resources.
Project:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1501,7 +1502,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1523,7 +1525,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1545,7 +1548,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of ProjectDeployment items
PagedProjectMetadata:
type: object
Expand All @@ -1130,6 +1131,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of ProjectMetadata items
PagedQnaSourceRecord:
type: object
Expand All @@ -1145,6 +1147,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of QnaSourceRecord items
PagedSynonymAsset:
type: object
Expand All @@ -1160,6 +1163,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of SynonymAsset items
ProjectDeployment:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1036,7 +1037,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -1132,7 +1133,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Manufacturer items
PagedWidget:
type: object
Expand All @@ -768,6 +769,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Widget items
RepeatabilityResult:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Manufacturer items
PagedWidget:
type: object
Expand All @@ -852,6 +853,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Widget items
RepeatabilityResult:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -2043,7 +2044,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand All @@ -2065,7 +2067,8 @@
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items"
"description": "The link to the next page of items",
"readOnly": true
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Manufacturer items
PagedWidget:
type: object
Expand All @@ -1496,6 +1497,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of Widget items
PagedWidgetPart:
type: object
Expand All @@ -1511,6 +1513,7 @@ components:
type: string
format: uri
description: The link to the next page of items
readOnly: true
description: Paged collection of WidgetPart items
RepeatabilityResult:
type: string
Expand Down
Loading

0 comments on commit 9b6e252

Please sign in to comment.