Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
api version compatibility
  • Loading branch information
kristapratico committed May 9, 2021
commit 62ca67ffee026bd99ab4d6abc521ac7c456a02f9
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def __init__(self, endpoint, credential, **kwargs):
self._api_version = kwargs.pop(
"api_version", FormRecognizerApiVersion.V2_1
)
if self._api_version.startswith("v"): # v2.0 released with this option
self._api_version = self._api_version[1:]
validate_api_version(self._api_version)

authentication_policy = get_authentication_policy(credential)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def __init__(
self._api_version = kwargs.pop(
"api_version", FormRecognizerApiVersion.V2_1
)
if self._api_version.startswith("v"): # v2.0 released with this option
self._api_version = self._api_version[1:]
validate_api_version(self._api_version)

authentication_policy = get_authentication_policy(credential)
Expand Down