rob05c edited a comment on issue #3966: Add server capabilities API URL: https://github.com/apache/trafficcontrol/pull/3966#issuecomment-540889517 > 1. message here needs to be corrected. we are deleting server_capabilities only by name. Yep, looks like an artifact of `api.GenericDelete`. Good catch! Looks like either `api.GenericDelete` will have to be changed to something like "no x with that key found," or otherwise extended to know the names of the key(s). > 2. when spaces are at the start and end of name, they are trimmed and accepted instead of throwing error. Trimming whitespace should be fine. It should be documented, but the extra safety seems like a good thing to me. > 3. api parameters are not validated. for instance, requesting service_capabilities endpoint with param id doesn't throw any error. The API shouldn't do this. Unknown parameters should be ignored. This follows the Robustness Principle. See https://tools.ietf.org/html/rfc1122#section-1.2.2 https://en.wikipedia.org/wiki/Robustness_principle This makes our API easier to use, and less likely to break users, and more forward-compatible. For example, someone could be using a client with a newer version, or newer code within the same version, but knowingly double-checking their filtering params (atstccfg does this); or posting some kind of debug information that helps themselves; or simply making a simple mistake that doesn't need to break things. I know some other APIs do this. It is a gross violation of the Robustness Principle, and I strongly disapprove. It makes servers brittle and fragile, and complicates integration and forward-compatibility.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
