From da29d5e8a6c90fdc6be9057e6cebdfe33b7be821 Mon Sep 17 00:00:00 2001 From: Matthew Setter Date: Thu, 11 Jul 2019 10:23:07 +0200 Subject: [PATCH 1/3] [10.3] [PR 1400] Document The New Trash bin WebDAV API in 10.3 Backport of PR #1400 --- .../pages/webdav_api/trashbin.adoc | 38 +++++++++---------- site.yml | 1 - 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/modules/developer_manual/pages/webdav_api/trashbin.adoc b/modules/developer_manual/pages/webdav_api/trashbin.adoc index bdcee84336..02e73fc2ee 100644 --- a/modules/developer_manual/pages/webdav_api/trashbin.adoc +++ b/modules/developer_manual/pages/webdav_api/trashbin.adoc @@ -54,10 +54,10 @@ NOTE: Only one level of files and directories is returned if this header is omit Curl:: + -- -[source,console] ----- +[source,console,subs="attributes+"] +.... include::{examplesdir}core/scripts/curl/dav/trashbin_api/list-files-in-trashbin.sh[] ----- +.... -- ==== @@ -74,10 +74,10 @@ If the user that you’re connecting with is authorized, then you will see outpu Curl:: + -- -[source,xml] ----- +[source,xml,subs="attributes+"] +.... include::{examplesdir}core/webdav_api/trashbin/list-files-in-trashbin-success-response.xml[] ----- +.... -- ==== @@ -112,10 +112,10 @@ Permanently delete a file from the trash bin. Curl:: + -- -[source,console] ----- +[source,console,subs="attributes+"] +.... include::{examplesdir}core/scripts/curl/dav/trashbin_api/delete-file-from-trashbin.sh[] ----- +.... -- ==== @@ -164,7 +164,7 @@ Restore a file from the trash bin. |`Destination` |string -|`/remote.php/dav/files//` +|`${SERVER_URI}/remote.php/dav/files//` |The path where the file will be restored to. |=== @@ -175,10 +175,10 @@ Restore a file from the trash bin. Curl:: + -- -[source,console] ----- +[source,console,subs="attributes+"] +.... include::{examplesdir}core/scripts/curl/dav/trashbin_api/restore-file-to-trashbin.sh[] ----- +.... -- ==== @@ -193,38 +193,38 @@ If `Overwrite` is set to `F` and a file with the same name in the specified loca If the `Overwrite` header is set to `F` and a file exists with the same name as specified in the `Destination` string, then an HTTP 412 (Precondition Failed) status code is returned, along with the following XML response: [source,xml] ----- +.... Sabre\DAV\Exception\PreconditionFailed The destination node already exists, and the overwrite header is set to false Overwrite ----- +.... ==== Incorrect Overwrite Header If the `Overwrite` header is not set to either `T` or `F`, then an HTTP 400 (Bad Request) status code will be returned, along with the following XML response: [source,xml] ----- +.... Sabre\DAV\Exception\BadRequest The HTTP Overwrite header should be either T or F ----- +.... ==== Destination Directory Does Not Exist If the destination directory does not exist, then an HTTP 409 (Conflict) status code will be returned, along with the following XML response: [source,xml] ----- +.... Sabre\DAV\Exception\Conflict The destination node is not found ----- +.... diff --git a/site.yml b/site.yml index 2945cac051..c3698acf4e 100644 --- a/site.yml +++ b/site.yml @@ -51,7 +51,6 @@ asciidoc: latest-version: 10.2 oc-contact-url: https://owncloud.com/contact/ oc-examples-server-url: 'https://owncloud.install.com/owncloud' - oc-examples-server-ip: '127.0.0.1' oc-examples-username: username oc-examples-password: password occ-command-example-prefix: 'sudo -u www-data php occ' From 0e92488f88bc3c5b4f99c70ef4aa66659c9adbc8 Mon Sep 17 00:00:00 2001 From: Matthew Setter Date: Wed, 25 Sep 2019 11:40:33 +0200 Subject: [PATCH 2/3] Backport conversion of source code block delimiters to standard form Backports 478a431. --- .../pages/webdav_api/trashbin.adoc | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/developer_manual/pages/webdav_api/trashbin.adoc b/modules/developer_manual/pages/webdav_api/trashbin.adoc index 02e73fc2ee..e807c34439 100644 --- a/modules/developer_manual/pages/webdav_api/trashbin.adoc +++ b/modules/developer_manual/pages/webdav_api/trashbin.adoc @@ -55,9 +55,9 @@ Curl:: + -- [source,console,subs="attributes+"] -.... +---- include::{examplesdir}core/scripts/curl/dav/trashbin_api/list-files-in-trashbin.sh[] -.... +---- -- ==== @@ -75,9 +75,9 @@ Curl:: + -- [source,xml,subs="attributes+"] -.... +---- include::{examplesdir}core/webdav_api/trashbin/list-files-in-trashbin-success-response.xml[] -.... +---- -- ==== @@ -113,9 +113,9 @@ Curl:: + -- [source,console,subs="attributes+"] -.... +---- include::{examplesdir}core/scripts/curl/dav/trashbin_api/delete-file-from-trashbin.sh[] -.... +---- -- ==== @@ -176,9 +176,9 @@ Curl:: + -- [source,console,subs="attributes+"] -.... +---- include::{examplesdir}core/scripts/curl/dav/trashbin_api/restore-file-to-trashbin.sh[] -.... +---- -- ==== @@ -193,38 +193,38 @@ If `Overwrite` is set to `F` and a file with the same name in the specified loca If the `Overwrite` header is set to `F` and a file exists with the same name as specified in the `Destination` string, then an HTTP 412 (Precondition Failed) status code is returned, along with the following XML response: [source,xml] -.... +---- Sabre\DAV\Exception\PreconditionFailed The destination node already exists, and the overwrite header is set to false Overwrite -.... +---- ==== Incorrect Overwrite Header If the `Overwrite` header is not set to either `T` or `F`, then an HTTP 400 (Bad Request) status code will be returned, along with the following XML response: [source,xml] -.... +---- Sabre\DAV\Exception\BadRequest The HTTP Overwrite header should be either T or F -.... +---- ==== Destination Directory Does Not Exist If the destination directory does not exist, then an HTTP 409 (Conflict) status code will be returned, along with the following XML response: [source,xml] -.... +---- Sabre\DAV\Exception\Conflict The destination node is not found -.... +---- From 7c064eee895917e413072bf46f439061c4c862ce Mon Sep 17 00:00:00 2001 From: Matthew Setter Date: Wed, 25 Sep 2019 12:06:58 +0200 Subject: [PATCH 3/3] Backport fix of build errors Backport of PR #1754 --- .../developer_manual/pages/webdav_api/trashbin.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/developer_manual/pages/webdav_api/trashbin.adoc b/modules/developer_manual/pages/webdav_api/trashbin.adoc index e807c34439..bdcee84336 100644 --- a/modules/developer_manual/pages/webdav_api/trashbin.adoc +++ b/modules/developer_manual/pages/webdav_api/trashbin.adoc @@ -54,7 +54,7 @@ NOTE: Only one level of files and directories is returned if this header is omit Curl:: + -- -[source,console,subs="attributes+"] +[source,console] ---- include::{examplesdir}core/scripts/curl/dav/trashbin_api/list-files-in-trashbin.sh[] ---- @@ -74,7 +74,7 @@ If the user that you’re connecting with is authorized, then you will see outpu Curl:: + -- -[source,xml,subs="attributes+"] +[source,xml] ---- include::{examplesdir}core/webdav_api/trashbin/list-files-in-trashbin-success-response.xml[] ---- @@ -112,7 +112,7 @@ Permanently delete a file from the trash bin. Curl:: + -- -[source,console,subs="attributes+"] +[source,console] ---- include::{examplesdir}core/scripts/curl/dav/trashbin_api/delete-file-from-trashbin.sh[] ---- @@ -164,7 +164,7 @@ Restore a file from the trash bin. |`Destination` |string -|`${SERVER_URI}/remote.php/dav/files//` +|`/remote.php/dav/files//` |The path where the file will be restored to. |=== @@ -175,7 +175,7 @@ Restore a file from the trash bin. Curl:: + -- -[source,console,subs="attributes+"] +[source,console] ---- include::{examplesdir}core/scripts/curl/dav/trashbin_api/restore-file-to-trashbin.sh[] ----