-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
add info about update mask to API doc introduction #10572
Conversation
@@ -160,6 +160,14 @@ info: | |||
|
|||
For details on configuring the authentication, see | |||
[API Authorization](https://airflow.readthedocs.io/en/latest/security/api.html). | |||
|
|||
# Update Mask |
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.
Can you move it to ### Update
section or ## Conventions
(first preferred)?
@@ -160,6 +160,14 @@ info: | |||
|
|||
For details on configuring the authentication, see | |||
[API Authorization](https://airflow.readthedocs.io/en/latest/security/api.html). | |||
|
|||
# Update Mask | |||
Update mask is available as a parameter in patch endpoints. It is used to notify the |
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 am afraid this has little effect on performance as these are only trivial memory operations.
The main reason for this is that you can get the full object with GET, update the selected fields, then send the full object and only indicate the fields to be updated. In other words, it's necessary to perform a partial update.
resource = request.get('/resource/my-id').json()
resource['my-field'] = 'new-value'
request.patch('/resource/my-id?update-mask=my-field', data=json.dumps(resource))
This makes it easier for the client to use the API.
Ok. I will update it. It was what I read from the link below that formed my explanation. https://developers.google.com/slides/how-tos/field-masks |
This PR adds information about update_mask to the REST API reference documentation
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.