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

 ##########
 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": "not@real.email",
-               "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:
   do we really want users to give null in the request? I really dislike that 
of a user of any API. As a user do I need to define the key and pass in null? 
Is that the same behavior as omitting the key? How do various programming 
languages clients handle setting `null` fields.
   
   But maybe it is a common approach in TO which in that case fine leave it but 
I strongly side with removing null in requests/responses going forward

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to