Skip to content

Commit 5e193b5

Browse files
authored
feat: replace message diagrams with autogenerated tables (#111)
1 parent fd73135 commit 5e193b5

31 files changed

+164
-602
lines changed

.github/workflows/autopublish.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
contents: write
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: actions/setup-node@v4
17-
with:
18-
node-version: 22.x
16+
- uses: ./.github/actions/setup-java
17+
- name: build java
18+
run: |
19+
cd artifacts
20+
./gradlew build
21+
./gradlew generateTablesFromSchemas
22+
cd ..
1923
- name: Copy files for correct web access
2024
run: |
2125
chmod +x ./.github/workflows/script.sh
2226
./.github/workflows/script.sh
23-
- name: Run Respec
24-
run:
25-
sudo npx puppeteer browsers install chrome
26-
npx respec --src index.html --out index.html.build.html -t 60 --disable-sandbox --verbose
2727
- uses: actions/upload-pages-artifact@v3
2828
with:
2929
path: .

.github/workflows/script.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
#!/bin/bash
2+
set -e
3+
4+
mkdir ./figures
25
mkdir -p ./message/schema
36
mkdir -p ./message/example
4-
mkdir -p ./message/diagram
5-
mkdir ./figures
7+
mkdir -p ./message/table
68
cp ./artifacts/src/main/resources/**/* ./message/schema || true
79
echo "successfully copied message schemas"
8-
cp -R "./artifacts/src/main/resources"/**/"example"/* ./message/example
10+
cp -r "./artifacts/src/main/resources"/**/"example"/* ./message/example
911
echo "successfully copied message examples"
10-
cp -R "./specifications"/**/"message/diagram"/*".png" message/diagram
11-
echo "successfully copied message diagrams"
12-
cp -R "./specifications"/**/"figures"/*".png" ./figures/
12+
cp -r "./specifications"/**/"figures"/*".png" ./figures/
1313
echo "successfully copied figures"
14+
cp -r "./artifacts/build/generated/tables"/*".html" ./message/table
15+
echo "successfully copied message property tables"
16+
1417
#rm -rf artifacts
1518
#echo "successfully removed artifacts"

specifications/catalog/catalog.binding.https.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Authorization: ...</pre>
7979
##### Response
8080

8181
If the request is successful, the [=Catalog Service=] must return an HTTP 200 (OK) with a response body containing
82-
a [Dataset](#ack-dataset) (which isa [DCAT Dataset](https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset) type described by the [=Catalog Protocol=]).
82+
a [Dataset](#ack-dataset).
8383

8484
<aside class="example" title="Dataset Response">
8585
<pre class="json" data-include="message/example/dataset.json">

specifications/catalog/catalog.protocol.md

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Servers have no obligation to process properties that are not part of the schema
1515

1616
### Catalog Request Message
1717

18-
| | |
19-
|---------------------|------------------------------------------------------------------------------|
20-
| **Sent by** | [=Consumer=] |
21-
| **Resulting state** | `TERMINATED` |
22-
| **Response** | [ACK](#ack-catalog) or [ERROR](#error-catalog-error) |
23-
| **Schema** | [JSON Schema](message/schema/catalog-request-message-schema.json) |
24-
| **Example** | [Message](message/example/catalog-request-message.json) |
25-
| **Diagram(s)** | ![](message/diagram/catalog-request-message.png "Catalog Request Message") |
18+
| | |
19+
|---------------------|---------------------------------------------------------------------------------------------|
20+
| **Sent by** | [=Consumer=] |
21+
| **Resulting state** | `TERMINATED` |
22+
| **Response** | [ACK](#ack-catalog) or [ERROR](#error-catalog-error) |
23+
| **Schema** | [JSON Schema](message/schema/catalog-request-message-schema.json) |
24+
| **Example** | [Message](message/example/catalog-request-message.json) |
25+
| **Properties** | <p data-include="message/table/catalogrequestmessage.html" data-include-format="html"></p> |
2626

2727
The Catalog Request Message is message sent by a [=Consumer=] to
2828
a [=Catalog Service=].
@@ -37,14 +37,14 @@ The [=Catalog Service=] must respond with a [Catalog](#ack-catalog) that adheres
3737

3838
### Dataset Request Message
3939

40-
| | |
41-
|---------------------|---------------------------------------------------------------------|
42-
| **Sent by** | [=Consumer=] |
43-
| **Resulting state** | `TERMINATED` |
44-
| **Response** | [ACK](#ack-catalog) or [ERROR](#error-catalog-error) |
45-
| **Schema** | [JSON Schema](message/schema/dataset-request-message-schema.json) |
46-
| **Example** | [Message](message/example/dataset-request-message.json) |
47-
| **Diagram(s)** | ![](message/diagram/dataset-request-message.png) |
40+
| | |
41+
|---------------------|---------------------------------------------------------------------------------------------|
42+
| **Sent by** | [=Consumer=] |
43+
| **Resulting state** | `TERMINATED` |
44+
| **Response** | [ACK](#ack-catalog) or [ERROR](#error-catalog-error) |
45+
| **Schema** | [JSON Schema](message/schema/dataset-request-message-schema.json) |
46+
| **Example** | [Message](message/example/dataset-request-message.json) |
47+
| **Properties** | <p data-include="message/table/datasetrequestmessage.html" data-include-format="html"></p> |
4848

4949
The Dataset Request Message is message sent by a [=Consumer=] to
5050
a [=Catalog Service=].
@@ -62,42 +62,37 @@ provided in protocol-dependent forms, e.g., for an HTTPS binding in the request
6262

6363
### ACK - Catalog
6464

65-
| | |
66-
|----------------|-----------------------------------------------------|
67-
| **Sent by** | [=Provider=] |
68-
| **Schema** | [JSON Schema](message/schema/catalog-schema.json) |
69-
| **Example** | [Catalog Example](message/example/catalog.json) |
70-
| **Diagram(s)** | ![](message/diagram/catalog.png) |
65+
| | |
66+
|----------------|-------------------------------------------------------------------------------|
67+
| **Sent by** | [=Provider=] |
68+
| **Schema** | [JSON Schema](message/schema/catalog-schema.json) |
69+
| **Example** | [Catalog Example](message/example/catalog.json) |
70+
| **Properties** | <p data-include="message/table/catalog.html" data-include-format="html"></p> |
7171

7272
The [=Catalog=] contains all [Datasets](#dataset) which the requester shall see.
7373

7474
### ACK - Dataset
7575

76-
| | |
77-
|----------------|-----------------------------------------------------|
78-
| **Sent by** | [=Provider=] |
79-
| **Schema** | [JSON Schema](message/schema/dataset-schema.json) |
80-
| **Example** | [Dataset Example](message/example/dataset.json) |
81-
| **Diagram(s)** | ![](message/diagram/dataset.png) |
76+
| | |
77+
|----------------|-------------------------------------------------------------------------------|
78+
| **Sent by** | [=Provider=] |
79+
| **Schema** | [JSON Schema](message/schema/dataset-schema.json) |
80+
| **Example** | [Dataset Example](message/example/dataset.json) |
81+
| **Properties** | <p data-include="message/table/dataset.html" data-include-format="html"></p> |
8282

8383
### ERROR - Catalog Error
8484

85-
| | |
86-
|----------------|-----------------------------------------------------------|
87-
| **Sent by** | [=Consumer=], [=Provider=] |
88-
| **Schema** | [JSON Schema](message/schema/catalog-error-schema.json) |
89-
| **Example** | [Error](message/example/catalog-error.json) |
90-
| **Diagram(s)** | ![](message/diagram/catalog-error.png) |
85+
| | |
86+
|----------------|------------------------------------------------------------------------------------|
87+
| **Sent by** | [=Consumer=], [=Provider=] |
88+
| **Schema** | [JSON Schema](message/schema/catalog-error-schema.json) |
89+
| **Example** | [Error](message/example/catalog-error.json) |
90+
| **Properties** | <p data-include="message/table/catalogerror.html" data-include-format="html"></p> |
9191

9292
A Catalog Error is used when an error occurred after a [Catalog Request Message](#catalog-request-message) or
9393
a [Dataset Request Message](#dataset-request-message) and the [=Provider=] cannot
9494
provide its [=Catalog=] to the requester.
9595

96-
| Field | Type | Description |
97-
|-----------|---------------|-------------------------------------------------------------|
98-
| `code` | String | An optional implementation-specific error code. |
99-
| `reasons` | Array[object] | An optional array of implementation-specific error objects. |
100-
10196
## Technical Considerations
10297

10398
### Queries and Filter Expressions
Binary file not shown.

specifications/catalog/message/diagram/catalog-error.puml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Binary file not shown.

specifications/catalog/message/diagram/catalog-request-message.puml

Lines changed: 0 additions & 15 deletions
This file was deleted.
Binary file not shown.

specifications/catalog/message/diagram/catalog.puml

Lines changed: 0 additions & 85 deletions
This file was deleted.
Binary file not shown.

specifications/catalog/message/diagram/dataset-request-message.puml

Lines changed: 0 additions & 15 deletions
This file was deleted.
Binary file not shown.

specifications/catalog/message/diagram/dataset.puml

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)