Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud_federation_api: Introduce OpenAPI spec #36356

Closed
wants to merge 1 commit into from

Conversation

provokateurin
Copy link
Member

@provokateurin provokateurin commented Jan 25, 2023

Summary

Adapts the code to make it friendly for https://github.com/nextcloud-gmbh/openapi-extractor and add the automatically generated spec.

TODO

Checklist

@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from 65e8e58 to 8ec7eec Compare January 26, 2023 15:01
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from 8ec7eec to 23f5f78 Compare January 27, 2023 06:39
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from 23f5f78 to 14c9c4f Compare January 27, 2023 07:05
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from 14c9c4f to f836c7c Compare February 1, 2023 07:41
@provokateurin provokateurin requested a review from come-nc February 1, 2023 07:41
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from f836c7c to 0a29f3b Compare February 1, 2023 08:03
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch 3 times, most recently from 40c8398 to cc06bb5 Compare February 1, 2023 11:31
@blizzz blizzz mentioned this pull request Feb 1, 2023
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from cc06bb5 to 6d44de2 Compare February 3, 2023 07:52
*
* Example: curl -H "Content-Type: application/json" -X POST -d '{"shareWith":"admin1@serve1","name":"welcome server2.txt","description":"desc","providerId":"2","owner":"admin2@http://localhost/server2","ownerDisplayName":"admin2 display","shareType":"user","resourceType":"file","protocol":{"name":"webdav","options":{"sharedSecret":"secret","permissions":"webdav-property"}}}' http://localhost/server/index.php/ocm/shares
*/
public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
public function addShare(string $shareWith, string $name, ?string $description, string $providerId, string $owner, ?string $ownerDisplayName, ?string $sharedBy, ?string $sharedByDisplayName, array $protocol, string $shareType, string $resourceType): JSONResponse {

Check failure

Code scanning / Psalm

InvalidDocblock

Found duplicated @return or prefixed @return tag in docblock for OCA\CloudFederationAPI\Controller\RequestHandlerController::addShare
*/
public function receiveNotification($notificationType, $resourceType, $providerId, array $notification) {
public function receiveNotification(string $notificationType, string $resourceType, ?string $providerId, ?array $notification): JSONResponse {

Check failure

Code scanning / Psalm

InvalidDocblock

Found duplicated @return or prefixed @return tag in docblock for OCA\CloudFederationAPI\Controller\RequestHandlerController::receiveNotification
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch 2 times, most recently from 1a874a9 to 1219a04 Compare February 3, 2023 09:08
Signed-off-by: jld3103 <jld3103yt@gmail.com>
@provokateurin provokateurin force-pushed the feature/cloud_federation_api-openapi branch from 1219a04 to c5650b7 Compare February 3, 2023 10:50
@provokateurin provokateurin marked this pull request as draft February 3, 2023 10:52
@provokateurin provokateurin mentioned this pull request Feb 10, 2023
8 tasks
@ChristophWurst ChristophWurst deleted the feature/cloud_federation_api-openapi branch February 14, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants