Skip to content

Commit 3f9fc7c

Browse files
authored
refactor: clean up (#62)
* refactor: cleanup * refactor: remove comment * fix: rename producer to provider * fix: adapt name of landing page for GitBooks
1 parent 91bc46d commit 3f9fc7c

9 files changed

Lines changed: 63 additions & 66 deletions

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
* [Introduction](./README.md)
5+
* [Dataspace Protocol v0.8](./README.md)
66
* [Terminology](./model/terminology.md)
77
* [Information Model](./model/model.md)
88

catalog/catalog.binding.https.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ request.
5050

5151
#### 2.3.2 OK (200) Response
5252

53-
If the request is successful, the catalog service must return a response body containing a [Catalog](./message/catalog.json) which is a profiled DCAT Catalog type
53+
If the request is successful, the catalog service must return a response body containing a [Catalog](./message/catalog.json) which is a profiled DCAT `Catalog` type
5454
described by the [Catalog Protocol Specification](catalog.protocol.md).
5555

5656
### 2.4 The `catalog/datasets/{id}` endpoint
5757

5858
#### 2.3.1 GET
5959

60-
The [DatasetRequestMessage](catalog.protocol.md#21-datasetrequestmessage) corresponds to `GET https://<base>/catalog/datasets/{id}}`:
60+
The [DatasetRequestMessage](catalog.protocol.md#24-datasetrequestmessage) corresponds to `GET https://<base>/catalog/datasets/{id}}`:
6161

6262
```
6363
GET https://provider.com/datasets/{id}
@@ -71,7 +71,7 @@ The `Authorization` header is optional if the catalog service does not require a
7171

7272
#### 2.4.2 OK (200) Response
7373

74-
If the request is successful, the catalog service must return a response body containing a [Dataset](./message/dataset.json) which is a DCAT Dataset type
74+
If the request is successful, the catalog service must return a response body containing a [Dataset](./message/dataset.json) which is a DCAT `Dataset` type
7575
described by the [Catalog Protocol Specification](catalog.protocol.md).
7676

7777
## 3 Technical Considerations
@@ -147,5 +147,5 @@ Authorization: ...
147147
}
148148
```
149149

150-
The `CatalogResponseMessage` would be POSTed back to the endpoint. the response message could be posted mutiple times for paginated results and would need to include the
150+
The `CatalogResponseMessage` would be POSTed back to the endpoint. the response message could be posted multiple times for paginated results and would need to include the
151151
original `@id` value as a `correlationId` and a property indicating if the contents are complete (or additional responses will be sent).

catalog/catalog.protocol.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ be defined in the relevant catalog binding specification.
5959
The catalog contains all [Asset Entries](#31-asset-entry) which the requester shall see.
6060

6161

62-
### 2.3 Catalog Error Message
62+
### 2.3 CatalogErrorMessage
6363

6464
![](./message/diagram/catalog-error-message.png)
6565

@@ -73,7 +73,7 @@ The catalog contains all [Asset Entries](#31-asset-entry) which the requester sh
7373

7474
#### Description
7575

76-
A Catalog Error Message is used when an error occured after a CatalogRequestMessage and the provider can not provide its catalog to the requester.
76+
A Catalog Error Message is used when an error occurred after a `CatalogRequestMessage` and the provider can not provide its catalog to the requester.
7777

7878
### 2.4 DatasetRequestMessage
7979

@@ -115,10 +115,10 @@ target attributes. The target of an offer is the asset associated with the conta
115115
An asset may contain 0..N [DCAT Distributions](https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution). Each distribution must have at least one `DataService` which specifies where
116116
the distribution is obtained. Specifically, a `DataService` specifies the endpoint for initiating a `ContractNegotiation` and `AssetTransfer`.
117117

118-
A Distribution may have 0..N `hasPolicy` attributes that contain an ODRL `Offer` defining the usage control policy associated with the asset and this explicit Distribution.
118+
A Distribution may have 0..N `hasPolicy` attributes that contain an ODRL `Offer` defining the usage control policy associated with the asset and this explicit `Distribution`.
119119
Offers must NOT contain any target attributes. The target of an offer is the asset entry that contains the distribution.
120120

121-
Support for `hasPolicy` attributes on a Distribution is optional. Implementations may choose not to support this feature, in which case they should return an appropriate error
121+
Support for `hasPolicy` attributes on a `Distribution` is optional. Implementations may choose not to support this feature, in which case they should return an appropriate error
122122
message to clients.
123123

124124
### 3.3 DataService

negotiation/contract.negotiation.binding.https.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The OpenAPI definitions for this specification can be accessed [here](TBD).
1515

1616
2. All request and response messages must use the `application/json` media type.
1717

18-
### 2.2 ContractNegotiationError
18+
### 2.2 Contract Negotiation Error
1919

2020
In the event of a client request error, the connector must return an appropriate HTTP 4xxx client error code. If an error body is returned it must be
2121
a [ContractNegotiationError](./message/contract-negotiation-error.json) with the following properties:
@@ -29,7 +29,7 @@ a [ContractNegotiationError](./message/contract-negotiation-error.json) with the
2929
### 2.2.1 State transition errors
3030

3131
If a client or provider connector makes a request that results in an invalid contract negotiation state transition as defined by the Contract Negotiation Protocol, it must return
32-
an HTTP code 400 (Bad Request) with an NegotiationErrorMessage in the response body.
32+
an HTTP code 400 (Bad Request) with an `ContractNegotiationError` in the response body.
3333

3434
### 2.3 Authorization
3535

@@ -146,7 +146,7 @@ A consumer connector can POST a [ContractNegotiationEventMessage](./message/cont
146146
provider contract offer. If the negotiation state is successfully transitioned, the provider must return HTTP code 200 (OK). The response body is not specified and clients are not
147147
required to process it.
148148

149-
If the current contract offer was created by the consumer, the provider must return HTTP code 400 (Bad Request) with an NegotiationErrorMessage in the response body.
149+
If the current contract offer was created by the consumer, the provider must return HTTP code 400 (Bad Request) with an `NegotiationErrorMessage` in the response body.
150150

151151
### 2.8 The provider `negotiations/:id/agreement/verification` resource
152152

negotiation/contract.negotiation.protocol.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ The CN states are:
3232

3333
### Contract Negotiation State Machine
3434

35-
The CN state machine is represented in the following diagram. Note that transitions to the TERMINATED state may occur from any other state and are not shown for simplicity:
35+
The CN state machine is represented in the following diagram. Note that transitions to the `TERMINATED` state may occur from any other state and are not shown for simplicity:
3636

3737
![](./contract.negotiation.state.machine.png)
3838

3939
Transitions marked with `C` indicate a message sent by the consumer, transitions marked with `P` indicate a provider message. Terminal states are final; the state machine may
40-
not transition to another state. A new CN may be initiated if, for instance, the CN entered the TERMINATED state due to a network issue.
40+
not transition to another state. A new CN may be initiated if, for instance, the CN entered the `TERMINATED` state due to a network issue.
4141

4242
## Message Types
4343

@@ -69,7 +69,7 @@ The CN state machine is transitioned upon receipt and acknowledgement of a messa
6969

7070
#### Description
7171

72-
The _ContractRequestMessage_ is sent by a consumer to initiate a contract negotiation.
72+
The `ContractRequestMessage` is sent by a consumer to initiate a contract negotiation.
7373

7474
#### Notes
7575

@@ -81,8 +81,6 @@ The _ContractRequestMessage_ is sent by a consumer to initiate a contract negoti
8181

8282
- The dataset id is not technically required but included to avoid an error where the offer is associated with a different data set.
8383

84-
> Comment sba (20.12.2022): Let's use the `offer.target` property for this, and nothing else.
85-
8684
- `callbackAddress` is a URL indicating where messages to the consumer should be sent in asynchronous settings. If the address is not understood, the provider MUST return an
8785
UNRECOVERABLE error.
8886

@@ -103,7 +101,7 @@ The _ContractRequestMessage_ is sent by a consumer to initiate a contract negoti
103101

104102
#### Description
105103

106-
The _ContractOfferMessage_ is sent by a provider to initiate a contract negotiation.
104+
The `ContractOfferMessage` is sent by a provider to initiate a contract negotiation.
107105

108106

109107
### 3. ContractAgreementMessage
@@ -122,11 +120,11 @@ The _ContractOfferMessage_ is sent by a provider to initiate a contract negotiat
122120

123121
#### Description
124122

125-
The _ContractAgreementMessage_ is sent by a provider when it agrees to a contract. It contains the complete contract agreement with the provider's signature.
123+
The `ContractAgreementMessage` is sent by a provider when it agrees to a contract. It contains the complete contract agreement with the provider's signature.
126124

127-
A _ContractAgreementMessage_ must contain a `processId`.
125+
A `ContractAgreementMessage` must contain a `processId`.
128126

129-
A _ContractAgreementMessage_ must contain an ODRL Agreement.
127+
A `ContractAgreementMessage` must contain an ODRL `Agreement`.
130128

131129
### 4. ContractAgreementVerificationMessage
132130

@@ -145,10 +143,10 @@ A _ContractAgreementMessage_ must contain an ODRL Agreement.
145143

146144
#### Description
147145

148-
The _ContractAgreementVerificationMessage_ is sent by a consumer to verify the acceptance of a contract agreement. A provider responds with an error if the signature can't be
146+
The `ContractAgreementVerificationMessage` is sent by a consumer to verify the acceptance of a contract agreement. A provider responds with an error if the signature can't be
149147
validated or is incorrect.
150148

151-
A _ContractAgreementVerificationMessage_ must contain a `processId`.
149+
A `ContractAgreementVerificationMessage` must contain a `processId`.
152150

153151
### 5. ContractNegotiationEventMessage
154152

@@ -167,15 +165,15 @@ A _ContractAgreementVerificationMessage_ must contain a `processId`.
167165

168166
#### Description
169167

170-
When the _ContractNegotiationEventMessage_ is sent by a provider with an `eventType` property set to `FINALIZED`, a contract agreement has been finalized and the associated asset
171-
is accessible. The state machine is transitioned to the PROVIDER_FINALIZED state. Other event types may be defined in the future. A consumer responds with an error if the signature
168+
When the `ContractNegotiationEventMessage` is sent by a provider with an `eventType` property set to `FINALIZED`, a contract agreement has been finalized and the associated asset
169+
is accessible. The state machine is transitioned to the `PROVIDER_FINALIZED` state. Other event types may be defined in the future. A consumer responds with an error if the signature
172170
can't be validated or is incorrect.
173171

174-
It is an error for a consumer to send a ContractNegotiationEventMessage with an eventType `finalized` to the provider.
172+
It is an error for a consumer to send a `ContractNegotiationEventMessage` with an eventType `finalized` to the provider.
175173

176-
When the _ContractNegotiationEventMessage_ is sent by a consumer with an `eventType` set to `ACCEPTED`, the state machine is placed in the CONSUMER_AGREED state.
174+
When the `ContractNegotiationEventMessage` is sent by a consumer with an `eventType` set to `ACCEPTED`, the state machine is placed in the `CONSUMER_AGREED` state.
177175

178-
It is an error for a provider to send a ContractNegotiationEventMessage with an eventType `ACCEPTED` to the consumer.
176+
It is an error for a provider to send a `ContractNegotiationEventMessage` with an eventType `ACCEPTED` to the consumer.
179177

180178
Note that contract events are not intended for propagation of agreement state after a contract negotiation has entered a terminal state. It is considered an error for a consumer or
181179
provider to send a contract negotiation event after the negotiation state machine has entered a terminal state.
@@ -194,15 +192,15 @@ provider to send a contract negotiation event after the negotiation state machin
194192

195193
#### Description
196194

197-
The _ContractNegotiationTerminationMessage_ is sent by a consumer or provider indicating it has cancelled the negotiation sequence. The message can be sent at any state of a negotiation
195+
The `ContractNegotiationTerminationMessage` is sent by a consumer or provider indicating it has cancelled the negotiation sequence. The message can be sent at any state of a negotiation
198196
without providing an explanation. Nevertheless, the sender may provide a description to help the receiver.
199197

200198
#### Notes
201199

202200
- A contract negotiation may be terminated for a variety of reasons, for example, an unrecoverable error was encountered or one of the parties no longer wishes to continue. A
203201
connector's operator may remove terminated contract negotiation resources after it has reached the terminated state.
204202

205-
- If an error is received in response to a ContractNegotiationTerminationMessage, the sending party may choose to ignore the error.
203+
- If an error is received in response to a `ContractNegotiationTerminationMessage`, the sending party may choose to ignore the error.
206204

207205
## ContractNegotiationError
208206

@@ -216,11 +214,11 @@ without providing an explanation. Nevertheless, the sender may provide a descrip
216214

217215
#### Description
218216

219-
The _ContractNegotiationError_ is an object returned by a consumer or provider indicating an error has occurred. It does not cause a state transition.
217+
The `ContractNegotiationError` is an object returned by a consumer or provider indicating an error has occurred. It does not cause a state transition.
220218

221219
#### Notes
222220

223-
- A _ContractNegotiationError_ is different to an error response. A _ContractNegotiationError_ does not necessarily finish the negotiation but can continue
221+
- A `ContractNegotiationError` is different to an error response. A `ContractNegotiationError` does not necessarily finish the negotiation but can continue
224222
afterwards.
225223

226224
## Hash and Signature Calculations
@@ -237,7 +235,7 @@ Hash and Signatures are calculated as defined in the [[JWS/CT]](#references) of
237235

238236
- Adopt JWS/CT, an extension to the JSON Web Signature (JWS) standard.
239237
- Combines the detached mode of JWS with the JSON Canonicalization Scheme (JCS). Detached mode is when the payload section of the JWS is replaced
240-
by an empty string: XXXX.PAYLOAD.YYYY becomes XXXX..YYYY. Detached mode is described in the JWS spec.
238+
by an empty string: `XXXX.PAYLOAD.YYYY` becomes `XXXX..YYYY`. Detached mode is described in the JWS spec.
241239
- Maintains Signed JSON data in JSON format.
242240

243241

negotiation/contract.negotiation.state.machine.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@startuml "hub-request-processing"
22
!pragma layout smetana
33

4-
!include ../diagrams/diagram.styles.puml
4+
!include ../common/style/diagram.styles.puml
55

66
hide empty description
77

transfer/transfer-process-state-machine.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@startuml "transfer-process-state-machine"
22
!pragma layout smetana
33

4-
!include ../../diagrams/diagram.styles.puml
4+
!include ../common/style/diagram.styles.puml
55

66
hide empty description
77

transfer/transfer.process.binding.https.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Note that if the location header is not an absolute URL, it must resolve to an a
119119
#### 2.6.1 POST
120120

121121
The consumer connector can POST a [TransferStartMessage](./message/transfer-start-message.json) to attempt to start a transfer process after it has been suspended. If the transfer
122-
process state is successfully transitioned, the producer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
122+
process state is successfully transitioned, the provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
123123

124124
### 2.7 The provider `transfers/:id/completion` resource
125125

@@ -140,7 +140,7 @@ process state is successfully transitioned, the provider must return HTTP code 2
140140
#### 2.9.1 POST
141141

142142
The consumer connector can POST a [TransferSuspensionMessage](./message/transfer-suspension-message.json) to suspend a transfer process. If the transfer
143-
process state is successfully transitioned, the producer must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
143+
process state is successfully transitioned, the provider must return HTTP code 200 (OK). The response body is not specified and clients are not required to process it.
144144

145145
## 3 Consumer Callback Path Bindings
146146

0 commit comments

Comments
 (0)