Skip to content

Commit abf2da4

Browse files
authored
fix(docs): Add document references to all currently specified documents (#273)
* fix(docs): Validation of docs generation in CI * fix(docs): remove test code from docs earthfile * fix(docs): regenerate image with latest stable d2 * fix(docs): All signed docs now have cross doc references * regen images
1 parent c2eb346 commit abf2da4

31 files changed

+1320
-593
lines changed

docs/src/architecture/08_concepts/signed_doc/doc_relationships.d2

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ copyright: |~md
2121
| Modified | 2025-04-09 |
2222
| Authors | Alex Pozhylenkov <[email protected]> |
2323
| | Steven Johnson <[email protected]> |
24-
25-
### Changelog
26-
27-
#### 0.01 (2025-04-04)
28-
29-
* First Published Version
30-
31-
#### 0.02 (2025-04-09)
32-
33-
* Add version control changelogs to the specification.
3424
~| {near: bottom-right}
3525

3626
"Brand Parameters": {
@@ -50,9 +40,11 @@ copyright: |~md
5040
"type [0]": 5ef32d5d-f240-462c-a7a4-ba4af221fa23
5141
"id": UUIDv7
5242
"ver": UUIDv7
43+
"brand_id": Brand Parameters
5344

5445
}
5546

47+
"Campaign Parameters"."brand_id"->"Brand Parameters"
5648

5749

5850
"Category Parameters": {
@@ -61,9 +53,11 @@ copyright: |~md
6153
"type [0]": 818938c3-3139-4daa-afe6-974c78488e95
6254
"id": UUIDv7
6355
"ver": UUIDv7
56+
"campaign_id": Campaign Parameters
6457

6558
}
6659

60+
"Category Parameters"."campaign_id"->"Campaign Parameters"
6761

6862

6963
"Comment Moderation Action": {
@@ -74,9 +68,11 @@ copyright: |~md
7468
"type [2]": a5d232b8-5e03-4117-9afd-be32b878fcdd
7569
"id": UUIDv7
7670
"ver": UUIDv7
71+
"ref": Proposal Comment
7772

7873
}
7974

75+
"Comment Moderation Action"."ref"->"Proposal Comment"
8076

8177

8278
"Election Parameters": {
@@ -85,9 +81,15 @@ copyright: |~md
8581
"type [0]": 788ff4c6-d65a-451f-bb33-575fe056b411
8682
"id": UUIDv7
8783
"ver": UUIDv7
84+
"brand_id": Brand Parameters
85+
"campaign_id": Campaign Parameters
86+
"category_id": Category Parameters
8887

8988
}
9089

90+
"Election Parameters"."brand_id"->"Brand Parameters"
91+
"Election Parameters"."campaign_id"->"Campaign Parameters"
92+
"Election Parameters"."category_id"->"Category Parameters"
9193

9294

9395
"Proposal": {
@@ -98,11 +100,15 @@ copyright: |~md
98100
"ver": UUIDv7
99101
"template": Proposal Template
100102
"collaborators": Collaborators Reference List
103+
"brand_id": Brand Parameters (Optional)
104+
"campaign_id": Campaign Parameters (Optional)
101105
"category_id": Category Parameters (Optional)
102106

103107
}
104108

105109
"Proposal"."template"->"Proposal Template"
110+
"Proposal"."brand_id"->"Brand Parameters": Optional
111+
"Proposal"."campaign_id"->"Campaign Parameters": Optional
106112
"Proposal"."category_id"->"Category Parameters": Optional
107113

108114

@@ -117,13 +123,17 @@ copyright: |~md
117123
"template": Proposal Comment Template
118124
"reply": Proposal Comment (Optional)
119125
"section": Section Reference
126+
"brand_id": Brand Parameters (Optional)
127+
"campaign_id": Campaign Parameters (Optional)
120128
"category_id": Category Parameters (Optional)
121129

122130
}
123131

124132
"Proposal Comment"."ref"->"Proposal"
125133
"Proposal Comment"."template"->"Proposal Comment Template"
126134
"Proposal Comment"."reply"->"Proposal Comment": <reply> Optional
135+
"Proposal Comment"."brand_id"->"Brand Parameters": Optional
136+
"Proposal Comment"."campaign_id"->"Campaign Parameters": Optional
127137
"Proposal Comment"."category_id"->"Category Parameters": Optional
128138

129139

@@ -152,11 +162,15 @@ copyright: |~md
152162
"id": UUIDv7
153163
"ver": UUIDv7
154164
"template": Proposal Comment Meta Template (Optional)
165+
"brand_id": Brand Parameters (Optional)
166+
"campaign_id": Campaign Parameters (Optional)
155167
"category_id": Category Parameters (Optional)
156168

157169
}
158170

159171
"Proposal Comment Template"."template"->"Proposal Comment Meta Template": Optional
172+
"Proposal Comment Template"."brand_id"->"Brand Parameters": Optional
173+
"Proposal Comment Template"."campaign_id"->"Campaign Parameters": Optional
160174
"Proposal Comment Template"."category_id"->"Category Parameters": Optional
161175

162176

@@ -183,9 +197,11 @@ copyright: |~md
183197
"type [2]": a5d232b8-5e03-4117-9afd-be32b878fcdd
184198
"id": UUIDv7
185199
"ver": UUIDv7
200+
"ref": Proposal
186201

187202
}
188203

204+
"Proposal Moderation Action"."ref"->"Proposal"
189205

190206

191207
"Proposal Submission Action": {
@@ -213,9 +229,13 @@ copyright: |~md
213229
"id": UUIDv7
214230
"ver": UUIDv7
215231
"template": Proposal Meta Template (Optional)
232+
"brand_id": Brand Parameters (Optional)
233+
"campaign_id": Campaign Parameters (Optional)
216234
"category_id": Category Parameters (Optional)
217235

218236
}
219237

220238
"Proposal Template"."template"->"Proposal Meta Template": Optional
239+
"Proposal Template"."brand_id"->"Brand Parameters": Optional
240+
"Proposal Template"."campaign_id"->"Campaign Parameters": Optional
221241
"Proposal Template"."category_id"->"Category Parameters": Optional

docs/src/architecture/08_concepts/signed_doc/doc_relationships.svg

Lines changed: 306 additions & 307 deletions
Loading

docs/src/architecture/08_concepts/signed_doc/docs/brand_parameters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Description
44

5-
TODO
5+
Parameters which define this brand within the system.
66

77
```d2 layout="elk"
88
"Brand Parameters": {
@@ -36,7 +36,7 @@ TODO
3636

3737
## Metadata
3838

39-
### `type`
39+
### [`type`](../metadata.md#type)
4040
<!-- markdownlint-disable MD033 -->
4141
| Parameter | Value |
4242
| --- | --- |
@@ -50,7 +50,7 @@ The document TYPE.
5050

5151
**MUST** be a known document type.
5252

53-
### `id`
53+
### [`id`](../metadata.md#id)
5454
<!-- markdownlint-disable MD033 -->
5555
| Parameter | Value |
5656
| --- | --- |
@@ -66,7 +66,7 @@ timestamp of when the document was created.
6666
IF [`ver`](../metadata.md#ver) does not == [`id`](../metadata.md#id) then a document with
6767
[`id`](../metadata.md#id) and [`ver`](../metadata.md#ver) being equal *MUST* exist.
6868

69-
### `ver`
69+
### [`ver`](../metadata.md#ver)
7070
<!-- markdownlint-disable MD033 -->
7171
| Parameter | Value |
7272
| --- | --- |

docs/src/architecture/08_concepts/signed_doc/docs/campaign_parameters.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Description
44

5-
TODO
5+
Parameters which define a Campaign within a Brand in the system.
66

77
```d2 layout="elk"
88
"Campaign Parameters": {
@@ -11,8 +11,11 @@ TODO
1111
"type [0]": 5ef32d5d-f240-462c-a7a4-ba4af221fa23
1212
"id": UUIDv7
1313
"ver": UUIDv7
14+
"brand_id": Brand Parameters
1415
1516
}
17+
18+
"Campaign Parameters"."brand_id"->"Brand Parameters"
1619
```
1720

1821
### Validation
@@ -36,7 +39,7 @@ TODO
3639

3740
## Metadata
3841

39-
### `type`
42+
### [`type`](../metadata.md#type)
4043
<!-- markdownlint-disable MD033 -->
4144
| Parameter | Value |
4245
| --- | --- |
@@ -50,7 +53,7 @@ The document TYPE.
5053

5154
**MUST** be a known document type.
5255

53-
### `id`
56+
### [`id`](../metadata.md#id)
5457
<!-- markdownlint-disable MD033 -->
5558
| Parameter | Value |
5659
| --- | --- |
@@ -66,7 +69,7 @@ timestamp of when the document was created.
6669
IF [`ver`](../metadata.md#ver) does not == [`id`](../metadata.md#id) then a document with
6770
[`id`](../metadata.md#id) and [`ver`](../metadata.md#ver) being equal *MUST* exist.
6871

69-
### `ver`
72+
### [`ver`](../metadata.md#ver)
7073
<!-- markdownlint-disable MD033 -->
7174
| Parameter | Value |
7275
| --- | --- |
@@ -80,6 +83,28 @@ The first version of the document must set [`ver`](../metadata.md#ver) == [`id`]
8083

8184
The document version must always be >= the document ID.
8285

86+
### [`brand_id`](../metadata.md#brand_id)
87+
<!-- markdownlint-disable MD033 -->
88+
| Parameter | Value |
89+
| --- | --- |
90+
| Required | yes |
91+
| Format | [Document Reference](../metadata.md#document-reference) |
92+
| Valid References | [Brand Parameters](brand_parameters.md) |
93+
| Exclusive | [`campaign_id`](../metadata.md#campaign_id) |
94+
| | [`category_id`](../metadata.md#category_id) |
95+
<!-- markdownlint-enable MD033 -->
96+
A reference to the Brand Parameters Document this document lies under.
97+
98+
#### Validation
99+
100+
In addition to the validation performed for [Document Reference](../metadata.md#document-reference) type fields:
101+
102+
* Any linked referenced document that includes a [`brand_id`](../metadata.md#brand_id) must match the
103+
[`brand_id`](../metadata.md#brand_id) of the referencing document.
104+
* MUST NOT be present in any document that contains
105+
[`campaign_id`](../metadata.md#campaign_id)
106+
and [`category_id`](../metadata.md#category_id) metadata.
107+
83108
## Payload
84109

85110
TODO

docs/src/architecture/08_concepts/signed_doc/docs/category_parameters.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Description
44

5-
TODO
5+
Parameters which define a Category withing a Campaign under a Brand in the system.
66

77
```d2 layout="elk"
88
"Category Parameters": {
@@ -11,8 +11,11 @@ TODO
1111
"type [0]": 818938c3-3139-4daa-afe6-974c78488e95
1212
"id": UUIDv7
1313
"ver": UUIDv7
14+
"campaign_id": Campaign Parameters
1415
1516
}
17+
18+
"Category Parameters"."campaign_id"->"Campaign Parameters"
1619
```
1720

1821
### Validation
@@ -36,7 +39,7 @@ TODO
3639

3740
## Metadata
3841

39-
### `type`
42+
### [`type`](../metadata.md#type)
4043
<!-- markdownlint-disable MD033 -->
4144
| Parameter | Value |
4245
| --- | --- |
@@ -50,7 +53,7 @@ The document TYPE.
5053

5154
**MUST** be a known document type.
5255

53-
### `id`
56+
### [`id`](../metadata.md#id)
5457
<!-- markdownlint-disable MD033 -->
5558
| Parameter | Value |
5659
| --- | --- |
@@ -66,7 +69,7 @@ timestamp of when the document was created.
6669
IF [`ver`](../metadata.md#ver) does not == [`id`](../metadata.md#id) then a document with
6770
[`id`](../metadata.md#id) and [`ver`](../metadata.md#ver) being equal *MUST* exist.
6871

69-
### `ver`
72+
### [`ver`](../metadata.md#ver)
7073
<!-- markdownlint-disable MD033 -->
7174
| Parameter | Value |
7275
| --- | --- |
@@ -80,6 +83,28 @@ The first version of the document must set [`ver`](../metadata.md#ver) == [`id`]
8083

8184
The document version must always be >= the document ID.
8285

86+
### [`campaign_id`](../metadata.md#campaign_id)
87+
<!-- markdownlint-disable MD033 -->
88+
| Parameter | Value |
89+
| --- | --- |
90+
| Required | yes |
91+
| Format | [Document Reference](../metadata.md#document-reference) |
92+
| Valid References | [Campaign Parameters](campaign_parameters.md) |
93+
| Exclusive | [`brand_id`](../metadata.md#brand_id) |
94+
| | [`category_id`](../metadata.md#category_id) |
95+
<!-- markdownlint-enable MD033 -->
96+
A reference to the Campaign Parameters Document this document lies under.
97+
98+
#### Validation
99+
100+
In addition to the validation performed for [Document Reference](../metadata.md#document-reference) type fields:
101+
102+
* Any linked referenced document that includes a [`campaign_id`](../metadata.md#campaign_id) must match the
103+
[`campaign_id`](../metadata.md#campaign_id) of the referencing document.
104+
* MUST NOT be present in any document that contains
105+
[`brand_id`](../metadata.md#brand_id)
106+
and [`category_id`](../metadata.md#category_id) metadata.
107+
83108
## Payload
84109

85110
TODO

0 commit comments

Comments
 (0)