-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
convert the workspace update api to patch style #16739
Conversation
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.
Looks good to me! Just left a small suggestion
if (workspacePatch.getSecurityUpdates() != null) { | ||
workspace.setSecurityUpdates(workspacePatch.getSecurityUpdates()); | ||
} | ||
if (workspacePatch.getEmail() != null) { |
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.
It looks like the old code was doing a nullOrEmpty
check, but the new code is just checking for null. Maybe the best thing to do for the new code would be to add a validation in validateWorkspacePatch
that the email address is properly formed? Or at least not an empty string?
* convert the workspace api to patch style * check for empty email in workspace update
* convert the workspace api to patch style * check for empty email in workspace update
What
Convert the workspace update API to accept PATCH-style updates.
How
Only apply updates from request parameters that have been specified.
Recommended reading order
airbyte-server/src/main/java/io/airbyte/server/handlers/WorkspacesHandler.java
airbyte-server/src/test/java/io/airbyte/server/handlers/WorkspacesHandlerTest.java