-
Notifications
You must be signed in to change notification settings - Fork 3.2k
update version number and API_version support #12154
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
a746d2c
d3b9a21
61b036c
fc5212d
123f2d6
b64ccac
13baf4e
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # ------------------------------------ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
| # ------------------------------------ | ||
|
|
||
| _SUPPORTED_API_VERSIONS = [ | ||
| "2019-05-06-Preview", | ||
|
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. If I understand the PR correctly, it's to make sure this is "2020-06-03" everywhere.
Member
Author
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. We will have a separate PR to update the API version number (that will include updating auto-generated code) |
||
| ] | ||
|
|
||
| def validate_api_version(api_version): | ||
| # type: (str) -> None | ||
| """Raise error if api_version is invalid """ | ||
| if not api_version: | ||
| return | ||
| if api_version not in _SUPPORTED_API_VERSIONS: | ||
| versions = '\n'.join(_SUPPORTED_API_VERSIONS) | ||
| raise ValueError("Unsupported API version '{}'. Please select from:\n{}".format(api_version, versions)) | ||
|
|
||
|
|
||
| def get_api_version(kwargs, default): | ||
| # type: (Dict[str, Any], str) -> str | ||
| api_version = kwargs.pop('api_version', None) | ||
| validate_api_version(api_version) | ||
| return api_version or default | ||
Uh oh!
There was an error while loading. Please reload this page.