Browse Source
comments: Add OpenAPI spec
comments: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>pull/39257/head
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
3 changed files with 112 additions and 4 deletions
-
3apps/comments/lib/Capabilities.php
-
15apps/comments/lib/Controller/NotificationsController.php
-
98apps/comments/openapi.json
@ -0,0 +1,98 @@ |
|||
{ |
|||
"openapi": "3.0.3", |
|||
"info": { |
|||
"title": "comments", |
|||
"version": "0.0.1", |
|||
"description": "Files app plugin to add comments to files", |
|||
"license": { |
|||
"name": "agpl" |
|||
} |
|||
}, |
|||
"components": { |
|||
"securitySchemes": { |
|||
"basic_auth": { |
|||
"type": "http", |
|||
"scheme": "basic" |
|||
}, |
|||
"bearer_auth": { |
|||
"type": "http", |
|||
"scheme": "bearer" |
|||
} |
|||
}, |
|||
"schemas": { |
|||
"Capabilities": { |
|||
"type": "object", |
|||
"required": [ |
|||
"files" |
|||
], |
|||
"properties": { |
|||
"files": { |
|||
"type": "object", |
|||
"required": [ |
|||
"comments" |
|||
], |
|||
"properties": { |
|||
"comments": { |
|||
"type": "boolean" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"paths": { |
|||
"/index.php/apps/comments/notifications/view/{id}": { |
|||
"get": { |
|||
"operationId": "notifications-view", |
|||
"summary": "View a notification", |
|||
"tags": [ |
|||
"notifications" |
|||
], |
|||
"security": [ |
|||
{}, |
|||
{ |
|||
"bearer_auth": [] |
|||
}, |
|||
{ |
|||
"basic_auth": [] |
|||
} |
|||
], |
|||
"parameters": [ |
|||
{ |
|||
"name": "id", |
|||
"in": "path", |
|||
"description": "ID of the notification", |
|||
"required": true, |
|||
"schema": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
], |
|||
"responses": { |
|||
"303": { |
|||
"description": "Redirected to notification", |
|||
"headers": { |
|||
"Location": { |
|||
"schema": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"404": { |
|||
"description": "Notification not found", |
|||
"content": { |
|||
"text/html": { |
|||
"schema": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"tags": [] |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue