Skip to content

Commit

Permalink
CICD Swagger changes for git config APIs (Azure#11528)
Browse files Browse the repository at this point in the history
* Swagger changes added for workspace & gitintegration specs

	* Updated workspace spec related git repository

	* Added gitintegration spec

	* Updated example files related to workspace

	* Added gitintegration example files
  • Loading branch information
praveenmathamsetty authored and giromm2ms committed Dec 20, 2020
1 parent 1034b23 commit c0877d2
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"workspaceName": "workspace1",
"api-version": "2019-06-01-preview",
"x-ms-client-request-id": "c8b9a072-76f6-4383-8350-db4431deb921",
"gitHubAccessTokenRequest": {
"gitHubClientId": "wvwvwvwvwv",
"gitHubAccessCode": "cwvcwvwev",
"gitHubAccessTokenBaseUrl": "https://github.com/login/oauth/access_token"
},
"endpoint": "https://azure.com"
},
"responses": {
"200": {
"body": {
"gitHubAccessToken": "zycdwcsdc"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
},
"sqlAdministratorLogin": "sqladminuser",
"privateEndpointConnections": [],
"workspaceRepositoryConfiguration": {
"type": "FactoryGitHubConfiguration",
"hostName": "",
"accountName": "myGithubAccount",
"projectName": "myProject",
"repositoryName": "myRepository",
"collaborationBranch": "master",
"rootFolder": "/"
},
"provisioningState": "Succeeded"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"swagger": "2.0",
"info": {
"version": "2019-06-01-preview",
"title": "ArtifactsClient"
},
"x-ms-parameterized-host": {
"hostTemplate": "{endpoint}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
}
]
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/getGitHubAccessToken": {
"post": {
"tags": [
"WorkspaceGitRepoManagement"
],
"operationId": "WorkspaceGitRepoManagement_getGitHubAccessToken",
"description": "Get the GitHub access token.",
"x-ms-examples": {
"Get SOL job query string": {
"$ref": "./examples/WorkspaceGitRepoManagement_getGitHubAccessToken.json"
}
},
"parameters": [
{
"name": "x-ms-client-request-id",
"x-ms-client-name": "ClientRequestId",
"in": "header",
"required": false,
"type": "string",
"description": "Can provide a guid, which is helpful for debugging and to provide better customer support"
},
{
"name": "api-version",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "gitHubAccessTokenRequest",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GitHubAccessTokenRequest"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/GitHubAccessTokenResponse"
}
}
}
}
}
},
"definitions": {
"GitHubAccessTokenRequest": {
"type": "object",
"properties": {
"gitHubClientId": {
"description": "The GitHub Client Id.",
"type": "string"
},
"gitHubAccessCode": {
"description": "The GitHub Access code.",
"type": "string"
},
"gitHubAccessTokenBaseUrl": {
"description": "The GitHub access token base URL.",
"type": "string"
}
},
"required": [
"gitHubClientId",
"gitHubAccessCode",
"gitHubAccessTokenBaseUrl"
]
},
"GitHubAccessTokenResponse": {
"type": "object",
"properties": {
"gitHubAccessToken": {
"type": "string"
}
}
}
},
"parameters": {
"Endpoint": {
"name": "endpoint",
"description": "The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "client"
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The Synapse client API Version."
}
}
}
2 changes: 2 additions & 0 deletions specification/synapse/data-plane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ input-file:
- Microsoft.Synapse/preview/2019-06-01-preview/entityTypes/SparkJobDefinition.json
- Microsoft.Synapse/preview/2019-06-01-preview/entityTypes/SqlScript.json
- Microsoft.Synapse/preview/2019-06-01-preview/entityTypes/Trigger.json
- Microsoft.Synapse/preview/2019-06-01-preview/gitintegration.json
```

### Tag: package-access-control-2020-02-01-preview
Expand Down Expand Up @@ -183,6 +184,7 @@ input-file:
- $(this-folder)/Microsoft.Synapse/preview/2020-02-01-preview/roleAssignments.json
- $(this-folder)/Microsoft.Synapse/preview/2019-06-01-preview/managedPrivateEndpoints.json
- $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/monitoring.json
- $(this-folder)/Microsoft.Synapse/preview/2019-06-01-preview/gitintegration.json
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@
"sqlAdministratorLogin": "login",
"sqlAdministratorLoginPassword": "password",
"managedVirtualNetwork": "default",
"managedResourceGroupName": "workspaceManagedResourceGroupUnique"
"managedResourceGroupName": "workspaceManagedResourceGroupUnique",
"workspaceRepositoryConfiguration": {
"type": "FactoryGitHubConfiguration",
"hostName": "",
"accountName": "mygithubaccount",
"projectName": "myproject",
"repositoryName": "myrepository",
"collaborationBranch": "master",
"rootFolder": "/"
}
},
"location": "East US",
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
},
"sqlAdministratorLogin": "login",
"managedResourceGroupName": "resourceGroup2",
"workspaceRepositoryConfiguration": {
"type": "FactoryGitHubConfiguration",
"hostName": "",
"accountName": "myGithubAccount",
"projectName": "myProject",
"repositoryName": "myRepository",
"collaborationBranch": "master",
"rootFolder": "/"
},
"provisioningState": "Succeeded",
"privateEndpointConnections": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"740239CE-A25B-485B-86A0-262F29F6EBDB"
]
},
"workspaceRepositoryConfiguration": {
"type": "FactoryGitHubConfiguration",
"hostName": "",
"accountName": "adifferentacount",
"projectName": "myproject",
"repositoryName": "myrepository",
"collaborationBranch": "master",
"rootFolder": "/"
},
"babylonConfiguration": {
"babylonResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectBabylon/accounts/accountname1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,40 @@
}
}
},
"WorkspaceRepositoryConfiguration": {
"description": "Git integration settings",
"type": "object",
"properties": {
"type": {
"description": "Type of workspace repositoryID configuration. Example WorkspaceVSTSConfiguration, WorkspaceGitHubConfiguration",
"type": "string"
},
"hostName": {
"description": "GitHub Enterprise host name. For example: https://github.mydomain.com",
"type": "string"
},
"accountName": {
"description": "Account name",
"type": "string"
},
"projectName": {
"description": "VSTS project name",
"type": "string"
},
"repositoryName": {
"description": "Repository name",
"type": "string"
},
"collaborationBranch": {
"description": "Collaboration branch",
"type": "string"
},
"rootFolder": {
"description": "Root folder to use in the repository",
"type": "string"
}
}
},
"BabylonConfiguration": {
"description": "Babylon Configuration",
"type": "object",
Expand Down Expand Up @@ -1159,6 +1193,10 @@
"description": "Managed Virtual Network Settings",
"$ref": "#/definitions/ManagedVirtualNetworkSettings"
},
"workspaceRepositoryConfiguration": {
"description": "Git integration settings",
"$ref": "#/definitions/WorkspaceRepositoryConfiguration"
},
"babylonConfiguration": {
"description": "Babylon Configuration",
"$ref": "#/definitions/BabylonConfiguration"
Expand Down Expand Up @@ -1199,6 +1237,10 @@
"description": "Managed Virtual Network Settings",
"$ref": "#/definitions/ManagedVirtualNetworkSettings"
},
"workspaceRepositoryConfiguration": {
"description": "Git integration settings",
"$ref": "#/definitions/WorkspaceRepositoryConfiguration"
},
"babylonConfiguration": {
"description": "Babylon Configuration",
"$ref": "#/definitions/BabylonConfiguration"
Expand Down

0 comments on commit c0877d2

Please sign in to comment.