tator icon indicating copy to clipboard operation
tator copied to clipboard

API consistency for `AttributeType` endpoint

Open jrtcppv opened this issue 3 years ago • 0 comments

For consistency with other endpoints, I would suggest renaming the code generated functions corresponding to different methods from:

add_attribute rename_attribute delete_attribute

to

create_attribute_type update_attribute_type delete_attribute_type

Also, because the PATCH method has evolved to a generic update method, I feel it should allow for partial updates to an object - namely if a field is omitted from new_attribute_type the existing value should be used. The old_attribute_type_name could instead be current_attribute_type_name (or maybe just current_name?) and the new_attribute_type could just be attribute_type_update; if that object happens to contain a new name or a new dtype, the rename/mutation behavior would still apply.

Unfortunately, all of this would cause API breakage.

jrtcppv avatar Feb 20 '22 04:02 jrtcppv