cloudfoundry / cloud_controller_ng

Cloud Foundry Cloud Controller
Apache License 2.0
191 stars 357 forks source link

Typos in "update user" v3 api documentation #3840

Closed jduss4 closed 3 months ago

jduss4 commented 3 months ago

Issue

The v3 CAPI "update user" example has several typos, one of which means requests following its instructions will fail.

Context

The problems:

Links:

Steps to Reproduce

  1. Navigate to the update a user documentation
  2. Log into a CF instance and select a user guid to update
  3. Run cf curl with the example code, changing the user guid to your test user
  4. Receive a "Request invalid due to parse error: invalid request body" response

Expected result

Once the closing bracket is added, the example will return an updated user object.

Current result

Invalid request body error

Possible Fix

I would have made a PR with the below suggested fix, but unfortunately the link to the CLA is not currently up to date and I am not sure if I would be able to sign it, as I am acting in my capacity as a federal employee. However, I believe this update to the documentation would remedy both typos (note: indentation was also changed):

  -d '{
    "metadata": {
      "labels": { "environment": "production" },
      "annotations": { "note": "detailed information" }
    }
  }'

Thank you!