Skip to content

Commit 2f77363

Browse files
Merge pull request #240 from CodeForPhilly/docs/slug-references
feat: child records reference their path-keyed parents by slug
2 parents 9931f47 + 1337359 commit 2f77363

81 files changed

Lines changed: 2515 additions & 730 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/api/gitsheets/contracts/codeforphilly.org/event-rsvps/v1.toml renamed to apps/api/gitsheets/contracts/codeforphilly.org/event-rsvps/v2.toml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"$id" = "https://codeforphilly.org/event-rsvps/v1"
1+
"$id" = "https://codeforphilly.org/event-rsvps/v2"
22
"$schema" = "http://json-schema.org/draft-07/schema#"
3-
required = ["createdAt", "eventId", "id", "personId", "updatedAt"]
3+
required = ["createdAt", "eventSlug", "id", "personSlug", "updatedAt", "year"]
44
title = "Event RSVP"
55
type = "object"
66

@@ -9,19 +9,17 @@ format = "date-time"
99
pattern = '^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$'
1010
type = "string"
1111

12-
[properties.eventId]
13-
format = "uuid"
14-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
12+
[properties.eventSlug]
13+
minLength = 1
1514
type = "string"
1615

1716
[properties.id]
1817
format = "uuid"
1918
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
2019
type = "string"
2120

22-
[properties.personId]
23-
format = "uuid"
24-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
21+
[properties.personSlug]
22+
minLength = 1
2523
type = "string"
2624

2725
[properties.plan]
@@ -37,3 +35,7 @@ type = "string"
3735
format = "date-time"
3836
pattern = '^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$'
3937
type = "string"
38+
39+
[properties.year]
40+
pattern = '^\d{4}$'
41+
type = "string"

apps/api/gitsheets/contracts/codeforphilly.org/help-wanted-interest/v1.toml renamed to apps/api/gitsheets/contracts/codeforphilly.org/help-wanted-interest/v2.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"$id" = "https://codeforphilly.org/help-wanted-interest/v1"
1+
"$id" = "https://codeforphilly.org/help-wanted-interest/v2"
22
"$schema" = "http://json-schema.org/draft-07/schema#"
3-
required = ["createdAt", "id", "personId", "roleId"]
3+
required = ["createdAt", "id", "personSlug", "roleId"]
44
title = "Help-wanted interest expression"
55
type = "object"
66

@@ -18,9 +18,8 @@ type = "string"
1818
maxLength = 2000
1919
type = "string"
2020

21-
[properties.personId]
22-
format = "uuid"
23-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
21+
[properties.personSlug]
22+
minLength = 1
2423
type = "string"
2524

2625
[properties.roleId]

apps/api/gitsheets/contracts/codeforphilly.org/help-wanted-roles/v1.toml renamed to apps/api/gitsheets/contracts/codeforphilly.org/help-wanted-roles/v2.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"$id" = "https://codeforphilly.org/help-wanted-roles/v1"
1+
"$id" = "https://codeforphilly.org/help-wanted-roles/v2"
22
"$schema" = "http://json-schema.org/draft-07/schema#"
3-
required = ["createdAt", "description", "id", "postedById", "projectId", "title", "updatedAt"]
3+
required = ["createdAt", "description", "id", "postedById", "projectSlug", "title", "updatedAt"]
44
title = "Help-wanted role"
55
type = "object"
66

@@ -42,9 +42,8 @@ format = "uuid"
4242
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
4343
type = "string"
4444

45-
[properties.projectId]
46-
format = "uuid"
47-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
45+
[properties.projectSlug]
46+
minLength = 1
4847
type = "string"
4948

5049
[properties.status]

apps/api/gitsheets/contracts/codeforphilly.org/project-buzz/v1.toml renamed to apps/api/gitsheets/contracts/codeforphilly.org/project-buzz/v2.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"$id" = "https://codeforphilly.org/project-buzz/v1"
1+
"$id" = "https://codeforphilly.org/project-buzz/v2"
22
"$schema" = "http://json-schema.org/draft-07/schema#"
3-
required = ["createdAt", "headline", "id", "projectId", "publishedAt", "slug", "updatedAt", "url"]
3+
required = ["createdAt", "headline", "id", "projectSlug", "publishedAt", "slug", "updatedAt", "url"]
44
title = "Project buzz"
55
type = "object"
66

@@ -30,9 +30,8 @@ format = "uuid"
3030
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
3131
type = "string"
3232

33-
[properties.projectId]
34-
format = "uuid"
35-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
33+
[properties.projectSlug]
34+
minLength = 1
3635
type = "string"
3736

3837
[properties.publishedAt]

apps/api/gitsheets/contracts/codeforphilly.org/project-memberships/v1.toml renamed to apps/api/gitsheets/contracts/codeforphilly.org/project-memberships/v2.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"$id" = "https://codeforphilly.org/project-memberships/v1"
1+
"$id" = "https://codeforphilly.org/project-memberships/v2"
22
"$schema" = "http://json-schema.org/draft-07/schema#"
3-
required = ["createdAt", "id", "joinedAt", "personId", "projectId", "updatedAt"]
3+
required = ["createdAt", "id", "joinedAt", "personSlug", "projectSlug", "updatedAt"]
44
title = "Project membership"
55
type = "object"
66

@@ -23,14 +23,12 @@ format = "date-time"
2323
pattern = '^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$'
2424
type = "string"
2525

26-
[properties.personId]
27-
format = "uuid"
28-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
26+
[properties.personSlug]
27+
minLength = 1
2928
type = "string"
3029

31-
[properties.projectId]
32-
format = "uuid"
33-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
30+
[properties.projectSlug]
31+
minLength = 1
3432
type = "string"
3533

3634
[properties.role]

apps/api/gitsheets/contracts/codeforphilly.org/project-updates/v1.toml renamed to apps/api/gitsheets/contracts/codeforphilly.org/project-updates/v2.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
"$id" = "https://codeforphilly.org/project-updates/v1"
1+
"$id" = "https://codeforphilly.org/project-updates/v2"
22
"$schema" = "http://json-schema.org/draft-07/schema#"
3-
required = ["body", "createdAt", "id", "number", "projectId", "updatedAt"]
3+
required = ["body", "createdAt", "id", "number", "projectSlug", "updatedAt"]
44
title = "Project update"
55
type = "object"
66

@@ -30,9 +30,8 @@ type = "integer"
3030
minimum = 1
3131
type = "integer"
3232

33-
[properties.projectId]
34-
format = "uuid"
35-
pattern = "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
33+
[properties.projectSlug]
34+
minLength = 1
3635
type = "string"
3736

3837
[properties.updatedAt]

‎apps/api/gitsheets/contracts/sources.toml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b
66
adopted = 2026-10-14T03:31:19.303Z
77
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/event-rsvps/v1.json"
88

9+
["codeforphilly.org/event-rsvps/v2"]
10+
adopted = 2026-10-15T16:36:36.638Z
11+
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/a60d22699d9336509fe88208206069bd2bd04364/contracts/codeforphilly.org/event-rsvps/v2.json"
12+
913
["codeforphilly.org/event-series/v1"]
1014
adopted = 2026-10-14T04:05:39.64Z
1115
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/67b879d8e2f22942d8d15537b796b9c41255c133/contracts/codeforphilly.org/event-series/v1.json"
@@ -18,10 +22,18 @@ source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b
1822
adopted = 2026-10-14T03:31:21.704Z
1923
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/help-wanted-interest/v1.json"
2024

25+
["codeforphilly.org/help-wanted-interest/v2"]
26+
adopted = 2026-10-15T16:36:35.442Z
27+
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/a60d22699d9336509fe88208206069bd2bd04364/contracts/codeforphilly.org/help-wanted-interest/v2.json"
28+
2129
["codeforphilly.org/help-wanted-roles/v1"]
2230
adopted = 2026-10-14T03:31:23.02Z
2331
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/help-wanted-roles/v1.json"
2432

33+
["codeforphilly.org/help-wanted-roles/v2"]
34+
adopted = 2026-10-15T16:36:34.227Z
35+
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/a60d22699d9336509fe88208206069bd2bd04364/contracts/codeforphilly.org/help-wanted-roles/v2.json"
36+
2537
["codeforphilly.org/people/v1"]
2638
adopted = 2026-10-14T03:31:24.46Z
2739
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/people/v1.json"
@@ -34,14 +46,26 @@ source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b
3446
adopted = 2026-10-14T03:31:27.13Z
3547
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/project-buzz/v1.json"
3648

49+
["codeforphilly.org/project-buzz/v2"]
50+
adopted = 2026-10-15T16:36:33.102Z
51+
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/a60d22699d9336509fe88208206069bd2bd04364/contracts/codeforphilly.org/project-buzz/v2.json"
52+
3753
["codeforphilly.org/project-memberships/v1"]
3854
adopted = 2026-10-14T03:31:28.4Z
3955
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/project-memberships/v1.json"
4056

57+
["codeforphilly.org/project-memberships/v2"]
58+
adopted = 2026-10-15T16:36:30.365Z
59+
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/a60d22699d9336509fe88208206069bd2bd04364/contracts/codeforphilly.org/project-memberships/v2.json"
60+
4161
["codeforphilly.org/project-updates/v1"]
4262
adopted = 2026-10-14T03:31:31.221Z
4363
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/project-updates/v1.json"
4464

65+
["codeforphilly.org/project-updates/v2"]
66+
adopted = 2026-10-15T16:36:31.891Z
67+
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/a60d22699d9336509fe88208206069bd2bd04364/contracts/codeforphilly.org/project-updates/v2.json"
68+
4569
["codeforphilly.org/projects/v1"]
4670
adopted = 2026-10-14T03:31:29.88Z
4771
source = "https://raw.githubusercontent.com/CodeForPhilly/codeforphilly-ng/7fe6b81a0bbd05b7a4e6896d55e181fdb61cfe42/contracts/codeforphilly.org/projects/v1.json"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[gitsheet]
22
root = 'event-rsvps'
33
path = '${{ year }}/${{ eventSlug }}/${{ personSlug }}'
4-
implements = ["codeforphilly.org/event-rsvps/v1"]
4+
implements = ["codeforphilly.org/event-rsvps/v2"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[gitsheet]
22
root = 'help-wanted-interest'
33
path = '${{ roleId }}/${{ personSlug }}'
4-
implements = ["codeforphilly.org/help-wanted-interest/v1"]
4+
implements = ["codeforphilly.org/help-wanted-interest/v2"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[gitsheet]
22
root = 'help-wanted-roles'
33
path = '${{ projectSlug }}/${{ id }}'
4-
implements = ["codeforphilly.org/help-wanted-roles/v1"]
4+
implements = ["codeforphilly.org/help-wanted-roles/v2"]

0 commit comments

Comments
 (0)