Skip to content

OCSResponse cleanup #1056

@rullzer

Description

@rullzer

Currently we have the OCSResponse in OCP https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Http/OCSResponse.php

However I question the use of this. Since people writing OCS code will use the OCSController which takes a DataResponse: https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Http/OCSResponse.php

On top of that the first OCSResponse parameter is the format string https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Http/OCSResponse.php#L57 which is weird since it is the job of the AppFramework/Controller to set this properly. When I'm writing my endpoint I don't want to care. I just want to return data.

So what I propose:

  1. Deprecate OCSResponse in OCP
  2. Create an internal OCSResponse type that does the correct magic

Good/bad idea? Comments? @BernhardPosselt @LukasReschke @nickvergessen @MorrisJobke

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions