You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In total there are 7 DELETE routes that accept a request body. 4 of these expect the body to be the JSON string of the array input. The remaining 3 use namespacing for the input variables.
One of these 3 has only a single variable: Remove assignees from an issue. The other two have multiple input parameters, so it wouldn’t work without namespacing:
I would suggest use namespace input parameters for all endpoints.
This could be done without breaking the API, the route handler could detect if it receives an object or an array (or single string in some cases) and handle it accordingly.
This inconsistency makes things a bit harder for the developers of Octokit libraries for the REST API, as they have to hardcode these exceptions. An alternative would be to call the parameter input for some while e.g. labels for others, but that would be confusing and again, inconsistent.
The text was updated successfully, but these errors were encountered:
Thanks! Yeah, I'm all about consistency. Being able to do it without breaking the API would be crucial. Let me file this internally to the team for discussion.
In total there are 7 DELETE routes that accept a request body. 4 of these expect the body to be the JSON string of the array input. The remaining 3 use namespacing for the input variables.
One of these 3 has only a single variable: Remove assignees from an issue. The other two have multiple input parameters, so it wouldn’t work without namespacing:
The 4 routes that expect the JSON string to be the input value only have a single input parameter:
I would suggest use namespace input parameters for all endpoints.
This could be done without breaking the API, the route handler could detect if it receives an object or an array (or single string in some cases) and handle it accordingly.
This inconsistency makes things a bit harder for the developers of Octokit libraries for the REST API, as they have to hardcode these exceptions. An alternative would be to call the parameter
input
for some while e.g.labels
for others, but that would be confusing and again, inconsistent.The text was updated successfully, but these errors were encountered: