com.thefibrehose.pattern
Schema Diff
+9 -5
Compatibility Analysis
Breaking Changes Detected
1 breaking change, 2 non-breaking changes.
Breaking Changes (1)
- RequiredEdgeRemoved RequiredEdgeRemoved { vertex_id: "com.thefibrehose.pattern:body", src: "com.thefibrehose.pattern:body", tgt: "com.thefibrehose.pattern:body.subject", kind: "prop", name: Some("subject") }
Non-Breaking Changes (2)
- AddedVertex AddedVertex { vertex_id: "com.thefibrehose.pattern:body.privatePdfId" }
- AddedEdge AddedEdge { src: "com.thefibrehose.pattern:body", tgt: "com.thefibrehose.pattern:body.privatePdfId", kind: "prop", name: Some("privatePdfId") }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "com.thefibrehose.pattern:body.privatePdfId" }
Additional Notes
- Breaking: RequiredEdgeRemoved { vertex_id: "com.thefibrehose.pattern:body", src: "com.thefibrehose.pattern:body", tgt: "com.thefibrehose.pattern:body.subject", kind: "prop", name: Some("subject") }
- Non-breaking: AddedEdge { src: "com.thefibrehose.pattern:body", tgt: "com.thefibrehose.pattern:body.privatePdfId", kind: "prop", name: Some("privatePdfId") }
1
1
{
2
2
"$type": "com.atproto.lexicon.schema",
3
3
"defs": {
4
4
"main": {
5
-
"description": "Structured metadata for a knitting/crochet pattern, paired with a com.thefibrehose.pdf record.",
5
+
"description": "Structured metadata for a knitting/crochet pattern. The PDF itself lives either as a paired com.thefibrehose.pdf record (subject) or on thefibrehose's own backend (privatePdfId) - exactly one of the two must be set, enforced client-side only since atproto lexicon cannot express cross-field conditionals (same precedent as the yardage/meterage pair below).",
6
6
"key": "tid",
7
7
"record": {
8
8
"properties": {
9
9
"attributes": {
10
10
"description": "Freeform descriptive tags, e.g. textured, colorwork, top-down.",
11
11
"items": {
12
12
"maxLength": 64,
13
13
"type": "string"
14
14
},
15
15
"maxLength": 30,
16
16
"type": "array"
17
17
},
18
18
"colorCount": {
19
19
"description": "Number of distinct yarn colors used in the pattern.",
20
20
"minimum": 1,
21
21
"type": "integer"
22
22
},
23
23
"craftType": {
24
24
"description": "Whether this is a knitting, crochet, or other pattern.",
25
25
"enum": [
26
26
"knitting",
27
27
"crochet",
28
28
"other"
29
29
],
30
30
"type": "string"
31
31
},
32
32
"createdAt": {
33
33
"description": "Timestamp when this pattern record was created.",
34
34
"format": "datetime",
35
35
"type": "string"
36
36
},
37
37
"difficulty": {
38
38
"description": "Optional difficulty rating, 1 (easiest) to 10 (hardest).",
39
39
"maximum": 10,
40
40
"minimum": 1,
41
41
"type": "integer"
42
42
},
43
43
"hookSizeMm": {
44
44
"description": "Recommended crochet hook size in millimeters (e.g. \"5.0\"). Relevant only when craftType is crochet. A string because atproto lexicon has no decimal numeric type.",
45
45
"maxLength": 16,
46
46
"type": "string"
47
47
},
48
48
"language": {
49
49
"description": "BCP-47 language tag the pattern is written in (e.g. \"en\", \"en-US\").",
50
50
"format": "language",
51
51
"type": "string"
52
52
},
53
53
"meterage": {
54
54
"description": "Yarn requirement in meters. Computed alongside yardage from whichever unit the uploader entered.",
55
55
"minimum": 0,
56
56
"type": "integer"
57
57
},
58
58
"name": {
59
59
"description": "The pattern's name/title, as given by the uploader.",
60
60
"maxLength": 200,
61
61
"type": "string"
62
62
},
63
63
"needleSizeMm": {
64
64
"description": "Recommended knitting needle size in millimeters (e.g. \"4.5\"). Relevant only when craftType is knitting. A string because atproto lexicon has no decimal numeric type.",
65
65
"maxLength": 16,
66
66
"type": "string"
67
67
},
68
68
"pdfFileName": {
69
-
"description": "Denormalized copy of the linked PDF's fileName, so the list view can display it without an extra fetch.",
69
+
"description": "The PDF's original filename, denormalized here so the list view can display it without an extra fetch regardless of where the file itself is hosted.",
70
70
"maxLength": 1024,
71
71
"type": "string"
72
72
},
73
73
"photo": {
74
74
"accept": [
75
75
"image/png",
76
76
"image/jpeg",
77
77
"image/webp"
78
78
],
79
-
"description": "Optional photo of the finished piece.",
79
+
"description": "Optional photo of the finished piece. Always an atproto blob regardless of where the PDF itself is hosted.",
80
80
"maxSize": 5242880,
81
81
"type": "blob"
82
82
},
83
+
"privatePdfId": {
84
+
"description": "Opaque id of the PDF as stored on thefibrehose's own access-controlled backend, when the PDF is not stored as an atproto blob. Mutually exclusive with subject; exactly one must be present.",
85
+
"maxLength": 64,
86
+
"type": "string"
87
+
},
83
88
"subject": {
84
-
"description": "Strong ref to the linked com.thefibrehose.pdf record holding the actual file.",
89
+
"description": "Strong ref to the linked com.thefibrehose.pdf record holding the actual file, when the PDF is stored as an atproto blob. Mutually exclusive with privatePdfId; exactly one must be present.",
85
90
"ref": "com.atproto.repo.strongRef",
86
91
"type": "ref"
87
92
},
88
93
"uploaderDid": {
89
94
"description": "DID of the account that originally uploaded this pattern. Redundant with the record's own repo ownership today, but keeps provenance explicit and self-describing if this record is ever copied, reposted, or indexed outside its own repo.",
90
95
"format": "did",
91
96
"type": "string"
92
97
},
93
98
"yardage": {
94
99
"description": "Yarn requirement in yards. Computed alongside meterage from whichever unit the uploader entered.",
95
100
"minimum": 0,
96
101
"type": "integer"
97
102
},
98
103
"yarnWeight": {
99
104
"description": "Craft Yarn Council standard yarn weight, 0 (Lace) to 7 (Jumbo).",
100
105
"maximum": 7,
101
106
"minimum": 0,
102
107
"type": "integer"
103
108
}
104
109
},
105
110
"required": [
106
-
"subject",
107
111
"uploaderDid",
108
112
"name",
109
113
"pdfFileName",
110
114
"craftType",
111
115
"yarnWeight",
112
116
"colorCount",
113
117
"language",
114
118
"createdAt"
115
119
],
116
120
"type": "object"
117
121
},
118
122
"type": "record"
119
123
}
120
124
},
121
125
"id": "com.thefibrehose.pattern",
122
126
"lexicon": 1
123
127
}