Skip to content

Commit

Permalink
fix changeableAttributes property for Manifest and Repository (#14155)
Browse files Browse the repository at this point in the history
* fix changeableAttributes property for Manifest and Repository

* separate resource type attributes

Signed-off-by: GitHub <noreply@github.com>

* fix patch schema

Signed-off-by: GitHub <noreply@github.com>

* address comment
  • Loading branch information
shahzzzam authored May 4, 2021
1 parent b93bd81 commit a7292a4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -731,13 +731,7 @@
"$ref": "#/parameters/ImageName"
},
{
"name": "value",
"in": "body",
"description": "Repository attribute value",
"required": false,
"schema": {
"$ref": "#/definitions/ChangeableAttributes"
}
"$ref": "#/parameters/RepositoryAttributeValue"
}
],
"responses": {
Expand Down Expand Up @@ -858,7 +852,7 @@
"$ref": "#/parameters/TagReference"
},
{
"$ref": "#/parameters/RepoValue"
"$ref": "#/parameters/TagAttributeValue"
}
],
"responses": {
Expand Down Expand Up @@ -1011,7 +1005,7 @@
"$ref": "#/parameters/ImageReference"
},
{
"$ref": "#/parameters/RepoValue"
"$ref": "#/parameters/ManifestAttributeValue"
}
],
"responses": {
Expand Down Expand Up @@ -1366,7 +1360,7 @@
},
"changeableAttributes": {
"description": "Changeable attributes",
"$ref": "#/definitions/ChangeableAttributes"
"$ref": "#/definitions/RepositoryChangeableAttributes"
}
},
"example": {
Expand All @@ -1375,7 +1369,8 @@
"readEnabled": true,
"listEnabled": true,
"deleteEnabled": true,
"writeEnabled": true
"writeEnabled": true,
"teleportEnabled": false
},
"imageName": "imageName",
"createdTime": "2018-09-07T16:30:46.6583219Z",
Expand Down Expand Up @@ -1495,8 +1490,8 @@
"description": "Is signed"
},
"changeableAttributes": {
"$ref": "#/definitions/ChangeableAttributes",
"description": "Changeable attributes"
"$ref": "#/definitions/TagChangeableAttributes",
"description": "Tag Changeable attributes"
}
},
"example": {
Expand Down Expand Up @@ -1672,7 +1667,7 @@
}
},
"changeableAttributes": {
"$ref": "#/definitions/ChangeableAttributes",
"$ref": "#/definitions/ManifestChangeableAttributes",
"description": "Changeable attributes"
}
},
Expand Down Expand Up @@ -1932,7 +1927,7 @@
"digest": "sha256:5d20c808ce198565ff70b3ed23a991dd49afac45dece63474b27ce6ed036adc6"
}
},
"ChangeableAttributes": {
"TagChangeableAttributes": {
"properties": {
"deleteEnabled": {
"type": "boolean",
Expand Down Expand Up @@ -2045,11 +2040,13 @@
},
"quarantineState": {
"type": "string",
"description": "Quarantine state"
"description": "Quarantine state",
"x-accessibility": "internal"
},
"quarantineDetails": {
"type": "string",
"description": "Quarantine details"
"description": "Quarantine details",
"x-accessibility": "internal"
}
},
"example": {
Expand All @@ -2061,6 +2058,38 @@
"writeEnabled": true
}
},
"RepositoryChangeableAttributes": {
"description": "Changeable attributes for Repository",
"properties": {
"deleteEnabled": {
"type": "boolean",
"description": "Delete enabled"
},
"writeEnabled": {
"type": "boolean",
"description": "Write enabled"
},
"listEnabled": {
"type": "boolean",
"description": "List enabled"
},
"readEnabled": {
"type": "boolean",
"description": "Read enabled"
},
"teleportEnabled": {
"type": "boolean",
"description": "Enables Teleport functionality on new images in the repository improving Container startup performance"
}
},
"example": {
"readEnabled": true,
"listEnabled": true,
"deleteEnabled": true,
"writeEnabled": true,
"teleportEnabled": true
}
},
"Manifest": {
"description": "Returns the requested manifest file",
"properties": {
Expand Down Expand Up @@ -2471,13 +2500,33 @@
"type": "string",
"x-ms-parameter-location": "method"
},
"RepoValue": {
"RepositoryAttributeValue": {
"name": "value",
"in": "body",
"description": "Repository attribute value",
"required": false,
"schema": {
"$ref": "#/definitions/ChangeableAttributes"
"$ref": "#/definitions/RepositoryChangeableAttributes"
},
"x-ms-parameter-location": "method"
},
"TagAttributeValue": {
"name": "value",
"in": "body",
"description": "Tag attribute value",
"required": false,
"schema": {
"$ref": "#/definitions/TagChangeableAttributes"
},
"x-ms-parameter-location": "method"
},
"ManifestAttributeValue": {
"name": "value",
"in": "body",
"description": "Manifest attribute value",
"required": false,
"schema": {
"$ref": "#/definitions/ManifestChangeableAttributes"
},
"x-ms-parameter-location": "method"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"deleteEnabled": true,
"writeEnabled": true,
"readEnabled": true,
"listEnabled": true
"listEnabled": true,
"teleportEnabled": true
}
}
}
Expand Down

0 comments on commit a7292a4

Please sign in to comment.