diff --git a/docs/src/main/paradox/docs/delta/api/archives-api.md b/docs/src/main/paradox/docs/delta/api/archives-api.md index a0b71f2f39..8e19a7f150 100644 --- a/docs/src/main/paradox/docs/delta/api/archives-api.md +++ b/docs/src/main/paradox/docs/delta/api/archives-api.md @@ -1,7 +1,7 @@ # Archives An archive is a collection of resources stored inside an archive file. The archiving format chosen for this purpose is -tar (or tarball). Archive resources are rooted in the `/v1/archives/{org_label}/{project_label}/` collection. +ZIP. Archive resources are rooted in the `/v1/archives/{org_label}/{project_label}/` collection. Each archive... @@ -101,7 +101,7 @@ The json payload: - If the `@id` value is not found on the payload, an @id will be generated as follows: `base:{UUID}`. The `base` is the `prefix` defined on the resource's project (`{project_label}`). -The response will be an HTTP 303 Location redirect, which will point to the url where to consume the archive (tarball). +The response will be an HTTP 303 Location redirect, which will point to the url where to consume the archive (ZIP). The following diagram can help to understand the HTTP exchange ![post-redirect-get](assets/archives/post-redirect-get.png "Post/Redirect/Get archive") @@ -109,7 +109,7 @@ The following diagram can help to understand the HTTP exchange **Example** The following example shows how to create an archive containing 3 files. 2 of them are resources and the other is a file. -As a response, the tarball will be offered. +As a response, the ZIP file will be offered. Request : @@snip [archive.sh](assets/archives/create.sh) @@ -147,16 +147,7 @@ Note that if the payload contains an @id different from the `{archive_id}`, the When fetching an archive, the response format can be chosen through HTTP content negotiation. In order to fetch the archive metadata, the client can use any of the @ref:[following MIME types](content-negotiation.md#supported-mime-types). -However, in order to fetch the archive content, the HTTP `Accept` header should be provided: - -* `*/*` or `application/x-tar` will return a tar archive (or tarball) -* `application/zip` will return a zip archive - -@@@ note { .warning } - -@link:[The limitations of the tar format](https://en.wikipedia.org/wiki/Tar_(computing)) -makes the usage of archives difficult (among other things, the maximum file name is limited to 100 characters), -so its support will be removed in a future release. +However, in order to fetch the archive content, the HTTP `Accept` header should be provided as `application/zip`. @@@ @@ -170,7 +161,7 @@ GET /v1/archives/{org_label}/{project_label}/{archive_id}?ignoreNotFound=true **Example** -Request (tarball) +Request (ZIP) : @@snip [fetch.sh](assets/archives/fetch.sh) Request (metadata) diff --git a/docs/src/main/paradox/docs/delta/api/assets/archives/fetch.sh b/docs/src/main/paradox/docs/delta/api/assets/archives/fetch.sh index 46fc4031d9..6961af6e50 100644 --- a/docs/src/main/paradox/docs/delta/api/assets/archives/fetch.sh +++ b/docs/src/main/paradox/docs/delta/api/assets/archives/fetch.sh @@ -1,3 +1,3 @@ curl "http://localhost:8080/v1/archives/myorg/myproject/myarchive" \ - -H "Accept: application/x-tar" \ - -o output.tar \ No newline at end of file + -H "Accept: application/x-zip" \ + -o output.zip \ No newline at end of file diff --git a/docs/src/main/paradox/docs/delta/api/assets/archives/fetched.json b/docs/src/main/paradox/docs/delta/api/assets/archives/fetched.json index de3ab9aab3..5d742add13 100644 --- a/docs/src/main/paradox/docs/delta/api/assets/archives/fetched.json +++ b/docs/src/main/paradox/docs/delta/api/assets/archives/fetched.json @@ -32,6 +32,6 @@ "_createdAt": "2021-05-17T14:54:42.939Z", "_createdBy": "http://localhost:8080/v1/realms/myrealm/users/john", "_updatedAt": "2021-05-17T14:54:42.939Z", - "_updatedBy": "http://localhost:8080/v1/realms/myrealm/users/john" + "_updatedBy": "http://localhost:8080/v1/realms/myrealm/users/john", "_expiresInSeconds": 17530 } \ No newline at end of file diff --git a/docs/src/main/paradox/docs/delta/api/index.md b/docs/src/main/paradox/docs/delta/api/index.md index 57ab90a186..6f988d6f1d 100644 --- a/docs/src/main/paradox/docs/delta/api/index.md +++ b/docs/src/main/paradox/docs/delta/api/index.md @@ -121,7 +121,7 @@ A file is a binary attachment resource. ## Archives -An archive is a collection of resources stored inside an archive file. The archiving format chosen for this purpose is tar (or tarball). +An archive is a collection of resources stored inside an archive file. The archiving format chosen for this purpose is ZIP file. @ref:[Operations on archives](archives-api.md) diff --git a/docs/src/main/paradox/docs/releases/v1.9-release-notes.md b/docs/src/main/paradox/docs/releases/v1.9-release-notes.md index 4819525804..eee009ea23 100644 --- a/docs/src/main/paradox/docs/releases/v1.9-release-notes.md +++ b/docs/src/main/paradox/docs/releases/v1.9-release-notes.md @@ -113,6 +113,10 @@ Annotated source is now available as an output format when creating an archive. Creating an archive now requires only the `resources/read` permission instead of `archives/write`. +#### Remove support for Tarball archives + +Tarball archives are no longer supported due to unnecessary restrictions. ZIP is now the only allowed format and clients should send `application/zip` in the `Accept` header when creating archives. + ### Storages Storages can no longer be created with credentials that would get stored: