-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Update connection type and auth type #20493
Changes from all commits
f545a22
ad05007
1b5794d
5d57323
1389b97
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 |
---|---|---|
|
@@ -5838,7 +5838,9 @@ | |
"ManagedIdentity", | ||
"UsernamePassword", | ||
"None", | ||
"SAS" | ||
"SAS", | ||
"ServicePrincipal", | ||
"AccessKey" | ||
], | ||
"type": "string", | ||
"description": "Authentication type of the connection target", | ||
|
@@ -5848,17 +5850,8 @@ | |
} | ||
}, | ||
"ConnectionCategory": { | ||
"enum": [ | ||
"PythonFeed", | ||
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. Please get an approval from the breaking changes review board. The relevant links are already present in the PR summary. Do not remove the breaking changes label especially without providing any justification. It will only take longer for the review to complete #Closed 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. This is not required as it is modeled as a string |
||
"ContainerRegistry", | ||
"Git" | ||
], | ||
"type": "string", | ||
"description": "Category of the connection", | ||
"x-ms-enum": { | ||
"name": "ConnectionCategory", | ||
"modelAsString": true | ||
} | ||
"description": "Category of the connection" | ||
}, | ||
"WorkspaceConnectionUsernamePassword": { | ||
"type": "object", | ||
|
@@ -5935,6 +5928,65 @@ | |
"additionalProperties": false, | ||
"x-ms-discriminator-value": "UsernamePassword" | ||
}, | ||
"WorkspaceConnectionAccessKey": { | ||
"type": "object", | ||
"properties": { | ||
"accessKeyId": { | ||
"type": "string" | ||
}, | ||
"secretAccessKey": { | ||
ZhidaLiu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "string", | ||
"x-ms-secret": true | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"AccessKeyAuthTypeWorkspaceConnectionProperties": { | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/WorkspaceConnectionPropertiesV2" | ||
} | ||
], | ||
"properties": { | ||
"credentials": { | ||
"$ref": "#/definitions/WorkspaceConnectionAccessKey" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"x-ms-discriminator-value": "AccessKey" | ||
}, | ||
"WorkspaceConnectionServicePrincipal": { | ||
"type": "object", | ||
"properties": { | ||
"clientId": { | ||
"type": "string" | ||
}, | ||
"clientSecret": { | ||
ZhidaLiu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "string", | ||
"x-ms-secret": true | ||
}, | ||
"tenantId": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"ServicePrincipalAuthTypeWorkspaceConnectionProperties": { | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/WorkspaceConnectionPropertiesV2" | ||
} | ||
], | ||
"properties": { | ||
"credentials": { | ||
"$ref": "#/definitions/WorkspaceConnectionServicePrincipal" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"x-ms-discriminator-value": "ServicePrincipal" | ||
}, | ||
"WorkspaceConnectionPropertiesV2": { | ||
"required": [ | ||
"authType" | ||
|
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.
Is it not possible add categories, rather than change it to unconstrained string?
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.
we are supporting more and more categories and updating swagger each time won't scale well. so we plan to change this back to a string, but we will check on server side and return an error message with supported categories.
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.
Not sure I get it. How can you add categories without a contract change? Contract change will require an API version change. Once you do that, it's easy to add enum values. In fact, you can add enum values without an API version change as well, as long as it sets modelAsString in the x-ms-enum extension. I don't see the advantage of unconstrained string.
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.
A constrained string needs to be modeled as an enum. Its not a good practice to accept a string and return a bad request if its not in the set u expect it to be. How do u expect your customers to know what the possible values are?