docs: align documented status to 200 OK for List roles and Update user#5185
Merged
philippthun merged 1 commit intoJun 15, 2026
Conversation
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
approved these changes
Jun 15, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A short explanation of the proposed change:
Two endpoints document an
HTTP/1.1 201 Createdresponse, but the controllers renderstatus: :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.erb—201 Created→200 OKPATCH /v3/users/:guid(Update a user):docs/v3/source/includes/resources/users/_update.md.erb—201 Created→200 OKController source (pinned to
661aa67)::ok→ roles_controller.rb#L24; onlycreaterenders:created→ #L58:ok→ users_controller.rb#L77; onlycreaterenders:created→ #L51-L55An 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
201was 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.
mainbranchbundle exec rake— N/A, docs-only change (no Ruby code modified)