ocket8888 commented on a change in pull request #3996: Rewrote /user/current to 
Go
URL: https://github.com/apache/trafficcontrol/pull/3996#discussion_r337129527
 
 

 ##########
 File path: docs/source/api/user_current.rst
 ##########
 @@ -147,49 +150,99 @@ Request Structure
        User-Agent: curl/7.47.0
        Accept: */*
        Cookie: mojolicious=...
-       Content-Length: 483
+       Content-Length: 465
        Content-Type: application/json
 
        { "user": {
-               "addressLine1": "not a real address",
-               "addressLine2": "not a real address either",
-               "city": "not a real city",
-               "company": "not a real company",
-               "country": "not a real country",
-               "email": "[email protected]",
-               "fullName": "Not a real fullName",
-               "phoneNumber": "not a real phone number",
-               "postalCode": "not a real postal code",
-               "publicSshKey": "not a real ssh key",
-               "stateOrProvince": "not a real state or province",
-               "tenantId": 1,
+               "addressLine1": null,
 
 Review comment:
   Yes and no. In general, yes, but because the old Perl version of the 
endpoint didn't require fields to be defined and I didn't feel like rewriting 
it that way was a good idea, it seems safer to just return an error rather than 
use implicit `null`s, because clients coded against the Perl version of APIs 
1.1 to 1.3 won't expect anything to have changed. Short of implementing the 
behavior unchanged failing fast I think failing fast is the best option.
   
   Now that I'm saying all this, I think maybe I ought to bring that up to the 
mailing list, seems like a big change for me to make with minimal community 
input.

----------------------------------------------------------------
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

Reply via email to