-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Datafactory] Add configure repo api swagger #2866
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
Changes from all commits
d7f5567
42b127d
c6c57b0
27d71a4
2c233a5
fa5757e
d9d3d1e
0628a88
7fd89d2
47d1905
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,6 +105,54 @@ | |
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/configureFactoryRepo": { | ||
| "post": { | ||
| "tags": [ | ||
| "configureFactoryRepo" | ||
| ], | ||
| "operationId": "Factories_ConfigureFactoryRepo", | ||
| "x-ms-examples": { | ||
| "Factories_ConfigureFactoryRepo": { | ||
| "$ref": "./examples/Factories_ConfigureFactoryRepo.json" | ||
| } | ||
| }, | ||
| "description": "Updates a factory's repo information.", | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/subscriptionId" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/locationId" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/api-version" | ||
| }, | ||
| { | ||
| "name": "factoryRepoUpdate", | ||
| "description": "Update factory repo request definition.", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/FactoryRepoUpdate" | ||
| } | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Factory" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "An error response received from the Azure Data Factory service.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories": { | ||
| "get": { | ||
| "tags": [ | ||
|
|
@@ -2854,6 +2902,56 @@ | |
| "type": "object" | ||
| } | ||
| }, | ||
| "FactoryVSTSConfiguration": { | ||
| "description": "Factory's VSTS repo information.", | ||
| "properties": { | ||
| "accountName": { | ||
| "description": "VSTS account name.", | ||
| "type": "string" | ||
| }, | ||
| "projectName": { | ||
| "description": "VSTS project name.", | ||
| "type": "string" | ||
| }, | ||
| "repositoryName": { | ||
| "description": "VSTS repository name.", | ||
| "type": "string" | ||
| }, | ||
| "collaborationBranch": { | ||
| "description": "VSTS collaboration branch.", | ||
| "type": "string" | ||
| }, | ||
| "rootFolder": { | ||
| "description": "VSTS root folder.", | ||
| "type": "string" | ||
| }, | ||
| "lastCommitId": { | ||
| "description": "VSTS last commit id.", | ||
| "type": "string" | ||
| }, | ||
| "tenantId": { | ||
| "description": "VSTS tenant id.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "FactoryRepoUpdate": { | ||
| "description": "Factory's VSTS repo information.", | ||
| "properties": { | ||
| "factoryResourceId": { | ||
| "description": "The factory resource id.", | ||
| "type": "string" | ||
| }, | ||
| "resourceGroupName": { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd ref this definition instead, in order to get client-side validation:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Chatted offline with @frankycrm14 about this, it looks like the defintion I mentioned is in the parameters section. For that reason, the real fix would be to refactor most of this into the definitions section, and reference that from the parameter and anywhere else it's used. However, that would only buy us a little client-side validation, and wouldn't be a breaking change to fix in the future. For those reasons, I'm not going to block this PR on this kinda comment. All that remains before I merge is ensuring that none of the linter errors being reported were introduced by this PR. |
||
| "description": "The resource group name.", | ||
| "type": "string" | ||
| }, | ||
| "vstsConfiguration": { | ||
| "$ref": "#/definitions/FactoryVSTSConfiguration", | ||
| "description": "VSTS repo information of the factory." | ||
| } | ||
| } | ||
| }, | ||
| "FactoryProperties": { | ||
| "description": "Factory resource properties.", | ||
| "properties": { | ||
|
|
@@ -2872,6 +2970,10 @@ | |
| "description": "Version of the factory.", | ||
| "type": "string", | ||
| "readOnly": true | ||
| }, | ||
| "vstsConfiguration": { | ||
| "$ref": "#/definitions/FactoryVSTSConfiguration", | ||
| "description": "VSTS repo information of the factory." | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -3698,6 +3800,14 @@ | |
| "maxLength": 63, | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "locationId": { | ||
| "name": "locationId", | ||
| "description": "The location identifier.", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "linkedServiceName": { | ||
| "name": "linkedServiceName", | ||
| "description": "The linked service name.", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| { | ||
| "parameters": { | ||
| "subscriptionId": "12345678-1234-1234-12345678abc", | ||
| "locationId": "eastus", | ||
| "factoryRepoUpdate": { | ||
| "resourceGroupName": "exampleResourceGroup", | ||
| "factoryId": "/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleresourcegroup/providers/Microsoft.DataFactory/factories/examplefactoryname", | ||
| "vstsConfiguration": { | ||
| "accountName": "msdata", | ||
| "projectName": "datafactory", | ||
| "repositoryName": "exampleRepo", | ||
| "collaborationBranch": "master", | ||
| "rootFolder": "/", | ||
| "lastCommitId": "", | ||
| "tenantId": "12f988bf-86d1-41af-91ab-2d7cd011db49" | ||
| } | ||
| }, | ||
| "api-version": "2017-09-01-preview" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "headers": { | ||
| "Date": "Wed, 13 Sep 2017 17:33:54 GMT", | ||
| "x-ms-request-id": "dc1954ed-a1d3-4437-bd73-480ffdf1ea5a", | ||
| "X-Content-Type-Options": "nosniff", | ||
| "x-ms-ratelimit-remaining-subscription-writes": "1198", | ||
| "x-ms-correlation-request-id": "8d66d31c-23f3-4ac1-bc8c-1b6464342ad1" | ||
| }, | ||
| "body": { | ||
| "name": "exampleFactoryName", | ||
| "tags": {}, | ||
| "properties": { | ||
| "provisioningState": "Succeeded", | ||
| "createTime": "2017-09-13T17:33:54.0294655Z", | ||
| "version": "2017-09-01-preview", | ||
| "vstsConfiguration": { | ||
| "accountName": "msdata", | ||
| "projectName": "datafactory", | ||
| "repositoryName": "exampleRepo", | ||
| "collaborationBranch": "master", | ||
| "rootFolder": "/", | ||
| "lastCommitId": "", | ||
| "tenantId": "12f988bf-86d1-41af-91ab-2d7cd011db49" | ||
| } | ||
| }, | ||
| "id": "/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleresourcegroup/providers/Microsoft.DataFactory/factories/examplefactoryname", | ||
| "type": "Microsoft.DataFactory/factories", | ||
| "location": "East US" | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path doesn't look valid.
should be like this:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/configureFactoryRepo. And if you need locationId passed from client, pass it as a parameter in query string or in body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we talked offline about this, I'll explore other options, and ask feedback on this from the ARM tema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt I need to tell you, @ravbhatnagar, but make sure to take a look at this comment thread. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just replied on email, IMO this should be modeled as an action on /factories/{factoryName} as mentioned by @hvermis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this returns a factory resource, Is it fine where someone who just has permission to this POST action can read the resource even though he may not have /read or /write permission. I am sure this API is not creating a factory resource. Is it changing the shape of the factory resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this changes some properties of the factory, to call this api you will need to have permissions for this post call and also write permissions to the factory