-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: improve pattern matching experience for response types #90
Conversation
1a2eec5
to
c831190
Compare
Also adds scalar delete operation and renames control plane response classes to avoid conflicts with data plan response names.
b330d84
to
2d1ed6a
Compare
2d1ed6a
to
7778a94
Compare
Pattern matching can be used to operate on the appropriate subtype. | ||
``` | ||
switch response { | ||
case let responseError as CacheDeleteError: | ||
case let responseError as DeleteCacheError: |
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.
are the code examples in the docstrings going to have to change into enum case matching?
switch response {
case DeleteCacheError.error(let e):
...
case DeleteCacheError.success(let s):
...
}
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 can pick up the task of updating the docstrings here while doing the other docstrings work though
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.
lgtm overall! hadn't realized we'd forgotten the delete cache item API but what you added looks good.
Had one comment about the docstrings, but I can pick up the task of reviewing docstrings again while working on that docstrings ticket
No description provided.