nextcloud / nextcloud/server

Clarify `ApiBase::request()` vs `OCS::request()` return contract

Open
#59,192 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

34-feedback overview technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

OCS::request() overrides ApiBase::request() but changes the effective return contract.

This is currently only a PHPDoc mismatch, but it makes the API contract unclear and complicates adding native return types.

Follow-up: consider splitting raw-response and decoded-OCS responsibilities into separate methods before adding explicit return types.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lib/private/Remote/Api/ApiBase.php and lib/private/Remote/Api/OCS.php at the referenced request() methods, then compare their PHPDoc with lib/public/Http/Client/IResponse.php. Done means the documentation clearly distinguishes the raw response body from decoded OCS data; the proposed method split is noted as follow-up work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.