Navigation Menu

Skip to content
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

Make connection_type for list_connections accept enum values #112

Merged
merged 4 commits into from Feb 24, 2022

Conversation

maxdeviant
Copy link
Contributor

This PR updates the handling of the connection_type parameter for the sso.list_connections method to support passing a ConnectionType enum value.

To retain backwards compatibility, we attempt to coerce any string values to their corresponding ConnectionType values. If given an invalid string, an exception will be thrown. This should not be a breaking change, as we already validate the connection types on the API side. All we're doing is moving the validation up into the SDK.

Fixes #110.

Closes #111.

tests/test_sso.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2022

Codecov Report

Merging #112 (5579a73) into master (603da60) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
+ Coverage   94.87%   94.93%   +0.06%     
==========================================
  Files          18       18              
  Lines         468      474       +6     
==========================================
+ Hits          444      450       +6     
  Misses         24       24              
Impacted Files Coverage Δ
workos/sso.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 603da60...5579a73. Read the comment docs.

@maxdeviant maxdeviant merged commit 47cd11c into master Feb 24, 2022
@maxdeviant maxdeviant deleted the coerce-connection-type-to-enum branch February 24, 2022 03:01
@maxdeviant maxdeviant mentioned this pull request Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list_connections says it takes a ConnectionType, takes a str
3 participants