Changeset View
Changeset View
Standalone View
Standalone View
docs/specs/protocol-reference.rst
Show All 9 Lines | |||||
However, we define some extensions by the means of extra tags in the Atom | However, we define some extensions by the means of extra tags in the Atom | ||||
entries, that should be used when interacting with the server to use it optimally. | entries, that should be used when interacting with the server to use it optimally. | ||||
This means the swh-deposit server should work with a generic SWORDv2 client, but | This means the swh-deposit server should work with a generic SWORDv2 client, but | ||||
works much better with these extensions. | works much better with these extensions. | ||||
All these tags are in the ``https://www.softwareheritage.org/schema/2018/deposit`` | All these tags are in the ``https://www.softwareheritage.org/schema/2018/deposit`` | ||||
XML namespace, denoted using the ``swhdeposit`` prefix in this section. | XML namespace, denoted using the ``swhdeposit`` prefix in this section. | ||||
.. _deposit-create_origin: | |||||
Origin creation with the ``<swhdeposit:create_origin>`` tag | Origin creation with the ``<swhdeposit:create_origin>`` tag | ||||
----------------------------------------------------------- | ----------------------------------------------------------- | ||||
Motivation | Motivation | ||||
^^^^^^^^^^ | ^^^^^^^^^^ | ||||
This is the main extension we define. | This is the main extension we define. | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
SWORDv2 implementations or old implementations of an swh-deposit client), the server | SWORDv2 implementations or old implementations of an swh-deposit client), the server | ||||
falls back to creating one based on the ``provider_url`` and the ``Slug`` header | falls back to creating one based on the ``provider_url`` and the ``Slug`` header | ||||
(as defined in the AtomPub_ specification) by concatenating them. | (as defined in the AtomPub_ specification) by concatenating them. | ||||
If the ``Slug`` header is missing, the server generates one randomly. | If the ``Slug`` header is missing, the server generates one randomly. | ||||
This fallback is provided for compliance with SWORDv2_ clients, but we do not | This fallback is provided for compliance with SWORDv2_ clients, but we do not | ||||
recommend relying on it, as it usually creates origins URL that are not meaningful. | recommend relying on it, as it usually creates origins URL that are not meaningful. | ||||
.. _deposit-add_to_origin: | |||||
Adding releases to an origin, with the ``<swhdeposit:add_to_origin>`` tag | Adding releases to an origin, with the ``<swhdeposit:add_to_origin>`` tag | ||||
------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ||||
When depositing a source code artifact for an origin (ie. software project) that | When depositing a source code artifact for an origin (ie. software project) that | ||||
was already deposited before, clients should not use ``<swhdeposit:create_origin>``, | was already deposited before, clients should not use ``<swhdeposit:create_origin>``, | ||||
as the origin was already created by the original deposit; and | as the origin was already created by the original deposit; and | ||||
``<swhdeposit:add_to_origin>`` should be used instead. | ``<swhdeposit:add_to_origin>`` should be used instead. | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |