Permalink
Browse files

Adding WOPI json declaration

  • Loading branch information...
1 parent 2951072 commit d8402f569d649eff09053c29e97efbdff9f89003 @ghecquet ghecquet committed Aug 23, 2016
Showing with 9 additions and 0 deletions.
  1. +1 −0 core/src/core/doc/wopi.json
  2. +8 −0 core/src/plugins/core.ajaxplorer/routes.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"}}}}}
@@ -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": [

0 comments on commit d8402f5

Please sign in to comment.