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

Fixed Swagger correctness for SourceControls API #25976

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
Expand Up @@ -60,7 +60,7 @@
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName"
},
{
"$ref": "#/parameters/RepoTypeParameter"
"$ref": "#/parameters/RepositoryAccess"
}
],
"responses": {
Expand Down Expand Up @@ -307,6 +307,10 @@
"description": "The name of the repository.",
"type": "string"
},
"installationId": {
"description": "The installation id of the repository.",
"type": "integer"
},
"branches": {
"description": "Array of branches.",
"items": {
Expand Down Expand Up @@ -347,6 +351,9 @@
}
],
"description": "Represents a SourceControl in Azure Security Insights.",
"required": [
"properties"
],
"properties": {
"properties": {
"description": "source control properties",
Expand Down Expand Up @@ -462,6 +469,34 @@
}
}
},
"RepositoryAccessObject": {
"description": "Credentials to access repository.",
"type": "object",
"required": [
"repositoryAccess"
],
"properties": {
"repositoryAccess": {
"description": "RepositoryAccess properties",
"$ref": "#/definitions/RepositoryAccess",
"x-ms-client-flatten": true
}
}
},
"RepositoryAccessProperties": {
"description": "Credentials to access repository.",
"type": "object",
"required": [
"properties"
],
"properties": {
"properties": {
"description": "RepositoryAccess properties",
"$ref": "#/definitions/RepositoryAccessObject",
"x-ms-client-flatten": true
}
}
},
"Repository": {
"type": "object",
"required": [
Expand Down Expand Up @@ -490,7 +525,6 @@
}
},
"ServicePrincipal": {
"readOnly": true,
"type": "object",
"description": "Service principal metadata.",
"properties": {
Expand All @@ -508,6 +542,11 @@
"description": "App id of service principal.",
"type": "string",
"readOnly": true
},
"credentialsExpireOn": {
"format": "date-time",
"description": "Expiration time of service principal credentials.",
"type": "string"
}
}
},
Expand Down Expand Up @@ -959,11 +998,7 @@
"required": [
"repositoryAccess"
],
"properties": {
"repositoryAccess": {
"$ref": "#/definitions/RepositoryAccess"
}
}
"$ref": "#/definitions/RepositoryAccessProperties"
oformaniuk marked this conversation as resolved.
Show resolved Hide resolved
},
"x-ms-parameter-location": "method"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
"workspaceName": "myWorkspace",
"sourceControlId": "789e0c1f-4a3d-43ad-809c-e713b677b04a",
"repositoryAccess": {
"repositoryAccess": {
"kind": "OAuth",
"code": "939fd7c6caf754f4f41f",
"state": "state",
"clientId": "54b3c2c0-1f48-4a1c-af9f-6399c3240b73"
"properties": {
"repositoryAccess": {
"kind": "OAuth",
"code": "939fd7c6caf754f4f41f",
"state": "state",
"clientId": "54b3c2c0-1f48-4a1c-af9f-6399c3240b73"
}
}
}
},
Expand Down