Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Adding WOPI json declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Aug 23, 2016
1 parent 2951072 commit d8402f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/core/doc/wopi.json
@@ -0,0 +1 @@
{"swagger":"2.0","host":"localhost","schemes":["http"],"basePath":"/wopi","info":{"version":"0.0.1","title":"Pydio WOPI V1","description":"Access to a Pydio File via WOPI protocol."},"paths":{"/files/{path}/contents":{"get":{"x-pydio-action":"download","description":"Get resource content.\n","operationId":"download","parameters":[{"$ref":"#/parameters/pathParameter"},{"name":"access_token","in":"query","description":"An access token that the host will use to determine whether the request is authorized.","type":"string","required":true},{"name":"X-WOPI-MaxExpectedSize","in":"header","description":"An integer specifying the upper bound of the expected size of the file being requested","type":"integer","required":false}],"produces":["application/octet-stream"],"responses":{"200":{"description":"Successful Response","schema":{"type":"file"}}},"tags":["File"]},"put":{"x-pydio-action":"upload","description":"Create resource by posting via form Data\n","operationId":"upload","consumes":["multipart/form-data"],"parameters":[{"$ref":"#/parameters/pathParameter"},{"name":"userfile_0","in":"formData","description":"File to upload","required":true,"type":"file"}],"responses":{"200":{"description":"Successful Response"}},"tags":["File"]}},"/files/{path}":{"get":{"x-pydio-action":"ls","description":"Get information about a file.\n","operationId":"getNodeInfos","parameters":[{"$ref":"#/parameters/pathParameter"},{"name":"format","in":"query","description":"Format of the response.","type":"string","required":true,"default":"json"},{"name":"access_token","in":"query","description":"An access token that the host will use to determine whether the request is authorized.","type":"string","required":true},{"name":"X-WOPI-SessionContext","in":"header","description":"The value of the Session context parameter, if provided on the initial WOPI action URL using the sc parameter.","type":"string","required":false}],"produces":["application/json","application/xml"],"responses":{"200":{"description":"Successful response","schema":{"$ref":"#/definitions/NodeList"}}},"tags":["File"]}}},"parameters":{"pathParameter":{"name":"path","in":"path","description":"Workspace id or alias + full path to the node, e.g. \"/my-files/path/to/node\"","required":true,"type":"string"}},"definitions":{"Node":{"title":"Node","description":"A file or folder represented as a generic resource, including metadata and children. Properties before children are part of the \"standard\" metadat set, properties after are returned by the \"extended\" metadata set.","type":"object","properties":{"path":{"type":"string"},"is_leaf":{"type":"boolean"},"label":{"type":"string"},"ajxp_modiftime":{"type":"integer"},"bytesize":{"type":"integer"},"stat":{"type":"object"},"ajxp_relativetime":{"type":"string"},"ajxp_description":{"type":"string"},"icon":{"type":"string"},"filesize":{"type":"string"},"mimestring_id":{"type":"string"},"ajxp_readonly":{"type":"boolean"},"file_perms":{"type":"string"},"repo_has_recycle":{"type":"boolean"},"children":{"$ref":"#/definitions/NodeList"}}},"NodeList":{"title":"NodeList","description":"List of Node objects","type":"object","properties":{"pagination":{"$ref":"#/definitions/PaginationData"},"data":{"type":"object","properties":{"node":{"$ref":"#/definitions/Node"},"children":{"type":"array","items":{"$ref":"#/definitions/Node"}}}}}},"PaginationData":{"title":"PaginationData","description":"Additional metadata attached to a NodeList for pagination. Could be sent through headers instead.","type":"object","properties":{"count":{"type":"integer","description":"total number of children"},"current":{"type":"integer","description":"current page"},"total":{"type":"integer","description":"total number of pages"},"dirs":{"type":"integer","description":"total number of \"collection\" childrens"},"remoteSort":{"type":"object","description":"additional attributes describing current server-side sorting"}}}}}
8 changes: 8 additions & 0 deletions core/src/plugins/core.ajaxplorer/routes.json
Expand Up @@ -7,6 +7,14 @@
"class": "Pydio\\Core\\Http\\Base",
"method": "handleRoute"
},
"/wopi": {
"methods": "*",
"routes": [
"/wopi[{optional:.+}]"
],
"class": "Pydio\\Core\\Http\\Base",
"method": "handleRoute"
},
"/user":{
"methods": "*",
"routes": [
Expand Down

0 comments on commit d8402f5

Please sign in to comment.