Skip to content

docs: align documented status to 200 OK for List roles and Update user#5185

Merged
philippthun merged 1 commit into
cloudfoundry:mainfrom
norman-abramovitz:docs/status-codes-roles-list-users-update
Jun 15, 2026
Merged

docs: align documented status to 200 OK for List roles and Update user#5185
philippthun merged 1 commit into
cloudfoundry:mainfrom
norman-abramovitz:docs/status-codes-roles-list-users-update

Conversation

@norman-abramovitz

@norman-abramovitz norman-abramovitz commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

A short explanation of the proposed change:

Two endpoints document an HTTP/1.1 201 Created response, but the controllers render status: :ok (200 OK). This PR aligns the docs with the currently shipped server behavior:

  • GET /v3/roles (List roles): docs/v3/source/includes/resources/roles/_list.md.erb201 Created200 OK
  • PATCH /v3/users/:guid (Update a user): docs/v3/source/includes/resources/users/_update.md.erb201 Created200 OK

Controller source (pinned to 661aa67):

An explanation of the use cases your change solves:

The docs currently misreport the success status for a list and an update endpoint, which can mislead client/SDK authors and contract-testing tools. This change makes the published docs match the actual response code (200 OK).

Note on direction: I deliberately picked the non-breaking fix (docs → match shipped behavior). If 201 was in fact the intended contract for these two endpoints, then the controllers would be the place to change instead — in that case I'm happy to close this in favor of that approach. See the discussion in #5183.

Links to any other associated PRs: none. Tracking issue: #5183.

  • I have reviewed the contributing guide
  • I have viewed, signed, and submitted the Contributor License Agreement
  • I have made this pull request to the main branch
  • I have run all the unit tests using bundle exec rake — N/A, docs-only change (no Ruby code modified)
  • I have run CF Acceptance Tests — N/A, docs-only change

The GET /v3/roles (List roles) and PATCH /v3/users/:guid (Update a user)
docs document HTTP/1.1 201 Created, but the controllers render
status: :ok (200). Align the docs to the shipped behavior.

See cloudfoundry#5183.
@philippthun philippthun merged commit 01e71b7 into cloudfoundry:main Jun 15, 2026
6 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Jun 15, 2026
Changes in cloud_controller_ng:

- docs: align documented status to 200 OK for list roles and update user
    PR: cloudfoundry/cloud_controller_ng#5185
    Author: Norman Abramovitz <norman-abramovitz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants