Passing the parameter "category" to an API can mean either filtering or updating the parameter in DB. What is the best practice/design for naming API parameters?
For example, I might send a request to update an item and updating its category, by filtering with category. Then I have the category parameter twice. How should I best name them?
Right now I have "filter_category" and "set_category" in which I then remove the prefix through a function that checks with a predefined prefix list.
Aucun commentaire:
Enregistrer un commentaire