Skip to content

Commit 850f51c

Browse files
committed
Removed redundant "strip" attribute
refs https://github.com/TryGhost/Toolbox/issues/314 refs 7e6a9ae - With relaxed schema validation and automatic "unknown property removal" feature introduced in the referenced commit the custom "strip" functionality is no longer needed!
1 parent 0c5fc71 commit 850f51c

File tree

14 files changed

+0
-372
lines changed

14 files changed

+0
-372
lines changed

packages/admin-api-schema/lib/schemas/labels.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@
1717
"slug": {
1818
"type": ["string", "null"],
1919
"maxLength": 191
20-
},
21-
"id": {
22-
"strip": true
23-
},
24-
"created_at": {
25-
"strip": true
26-
},
27-
"created_by": {
28-
"strip": true
29-
},
30-
"updated_at": {
31-
"strip": true
32-
},
33-
"updated_by": {
34-
"strip": true
3520
}
3621
}
3722
}

packages/admin-api-schema/lib/schemas/members-edit.json

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
"maxLength": 191,
2626
"pattern": "^([^,]|$)"
2727
},
28-
"avatar_image": {
29-
"strip": true
30-
},
3128
"note": {
3229
"type": "string",
3330
"minLength": 0,
@@ -42,9 +39,6 @@
4239
"comped": {
4340
"type": "boolean"
4441
},
45-
"id": {
46-
"strip": true
47-
},
4842
"products": {
4943
"$ref": "members#/definitions/member-products"
5044
},
@@ -56,30 +50,6 @@
5650
},
5751
"labels": {
5852
"$ref": "members#/definitions/member-labels"
59-
},
60-
"email_count": {
61-
"strip": true
62-
},
63-
"email_opened_count": {
64-
"strip": true
65-
},
66-
"email_open_rate": {
67-
"strip": true
68-
},
69-
"email_recipients": {
70-
"strip": true
71-
},
72-
"created_at": {
73-
"strip": true
74-
},
75-
"created_by": {
76-
"strip": true
77-
},
78-
"updated_at": {
79-
"strip": true
80-
},
81-
"updated_by": {
82-
"strip": true
8353
}
8454
}
8555
}

packages/admin-api-schema/lib/schemas/members-upload.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
"maxLength": 191,
2121
"pattern": "^([^,]|$)"
2222
},
23-
"avatar_image": {
24-
"strip": true
25-
},
2623
"note": {
2724
"type": ["string", "null"],
2825
"minLength": 0,

packages/admin-api-schema/lib/schemas/members.json

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
"maxLength": 191,
2020
"pattern": "^([^,]|$)"
2121
},
22-
"avatar_image": {
23-
"strip": true
24-
},
2522
"note": {
2623
"type": "string",
2724
"minLength": 0,
@@ -39,9 +36,6 @@
3936
"subscriptions": {
4037
"type": "array"
4138
},
42-
"id": {
43-
"strip": true
44-
},
4539
"labels": {
4640
"$ref": "#/definitions/member-labels"
4741
},
@@ -53,30 +47,6 @@
5347
},
5448
"newsletters": {
5549
"$ref": "#/definitions/member-newsletters"
56-
},
57-
"email_count": {
58-
"strip": true
59-
},
60-
"email_opened_count": {
61-
"strip": true
62-
},
63-
"email_open_rate": {
64-
"strip": true
65-
},
66-
"email_recipients": {
67-
"strip": true
68-
},
69-
"created_at": {
70-
"strip": true
71-
},
72-
"created_by": {
73-
"strip": true
74-
},
75-
"updated_at": {
76-
"strip": true
77-
},
78-
"updated_by": {
79-
"strip": true
8050
}
8151
}
8252
},
@@ -162,9 +132,6 @@
162132
"slug": {
163133
"type": ["string", "null"],
164134
"maxLength": 191
165-
},
166-
"members": {
167-
"strip": true
168135
}
169136
},
170137
"anyOf": [

packages/admin-api-schema/lib/schemas/pages.json

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -126,48 +126,6 @@
126126
},
127127
"tags": {
128128
"$ref": "#/definitions/page-tags"
129-
},
130-
"id": {
131-
"strip": true
132-
},
133-
"page": {
134-
"strip": true
135-
},
136-
"author": {
137-
"strip": true
138-
},
139-
"author_id": {
140-
"strip": true
141-
},
142-
"created_at": {
143-
"strip": true
144-
},
145-
"created_by": {
146-
"strip": true
147-
},
148-
"updated_by": {
149-
"strip": true
150-
},
151-
"published_by": {
152-
"strip": true
153-
},
154-
"url": {
155-
"strip": true
156-
},
157-
"primary_tag": {
158-
"strip": true
159-
},
160-
"primary_author": {
161-
"strip": true
162-
},
163-
"excerpt": {
164-
"strip": true
165-
},
166-
"plaintext": {
167-
"strip": true
168-
},
169-
"frontmatter": {
170-
"strip": true
171129
}
172130
}
173131
},
@@ -224,12 +182,6 @@
224182
"email": {
225183
"type": "string",
226184
"maxLength": 191
227-
},
228-
"roles": {
229-
"strip": true
230-
},
231-
"permissions": {
232-
"strip": true
233185
}
234186
},
235187
"anyOf": [
@@ -264,15 +216,6 @@
264216
"slug": {
265217
"type": ["string", "null"],
266218
"maxLength": 191
267-
},
268-
"parent": {
269-
"strip": true
270-
},
271-
"parent_id": {
272-
"strip": true
273-
},
274-
"pages": {
275-
"strip": true
276219
}
277220
},
278221
"anyOf": [

packages/admin-api-schema/lib/schemas/posts.json

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -133,63 +133,6 @@
133133
},
134134
"tags": {
135135
"$ref": "#/definitions/post-tags"
136-
},
137-
"id": {
138-
"strip": true
139-
},
140-
"uuid": {
141-
"strip": true
142-
},
143-
"comment_id": {
144-
"strip": true
145-
},
146-
"author": {
147-
"strip": true
148-
},
149-
"author_id": {
150-
"strip": true
151-
},
152-
"page": {
153-
"strip": true
154-
},
155-
"created_at": {
156-
"strip": true
157-
},
158-
"created_by": {
159-
"strip": true
160-
},
161-
"updated_by": {
162-
"strip": true
163-
},
164-
"published_by": {
165-
"strip": true
166-
},
167-
"url": {
168-
"strip": true
169-
},
170-
"primary_tag": {
171-
"strip": true
172-
},
173-
"primary_author": {
174-
"strip": true
175-
},
176-
"excerpt": {
177-
"strip": true
178-
},
179-
"plaintext": {
180-
"strip": true
181-
},
182-
"email": {
183-
"strip": true
184-
},
185-
"email_segment": {
186-
"strip": true
187-
},
188-
"frontmatter": {
189-
"strip": true
190-
},
191-
"newsletter": {
192-
"strip": true
193136
}
194137
}
195138
},
@@ -246,12 +189,6 @@
246189
"email": {
247190
"type": "string",
248191
"maxLength": 191
249-
},
250-
"roles": {
251-
"strip": true
252-
},
253-
"permissions": {
254-
"strip": true
255192
}
256193
},
257194
"anyOf": [
@@ -286,15 +223,6 @@
286223
"slug": {
287224
"type": ["string", "null"],
288225
"maxLength": 191
289-
},
290-
"parent": {
291-
"strip": true
292-
},
293-
"parent_id": {
294-
"strip": true
295-
},
296-
"posts": {
297-
"strip": true
298226
}
299227
},
300228
"anyOf": [

packages/admin-api-schema/lib/schemas/products.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
"active": {
2525
"type": "boolean"
2626
},
27-
"updated_at": {
28-
"strip": true
29-
},
30-
"created_at": {
31-
"strip": true
32-
},
3327
"stripe_prices": {
3428
"type": ["array", "null"],
3529
"items": {
@@ -82,12 +76,6 @@
8276
"interval": {
8377
"type": ["string", "null"],
8478
"enum": ["year", "month", "week", "day"]
85-
},
86-
"updated_at": {
87-
"strip": true
88-
},
89-
"created_at": {
90-
"strip": true
9179
}
9280
}
9381
},
@@ -106,12 +94,6 @@
10694
"slug": {
10795
"type": "string",
10896
"maxLength": 191
109-
},
110-
"updated_at": {
111-
"strip": true
112-
},
113-
"created_at": {
114-
"strip": true
11597
}
11698
},
11799
"anyOf": [

packages/admin-api-schema/lib/schemas/snippets.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@
1717
"type": "string",
1818
"format": "json-string",
1919
"maxLength": 1000000000
20-
},
21-
"id": {
22-
"strip": true
23-
},
24-
"created_at": {
25-
"strip": true
26-
},
27-
"created_by": {
28-
"strip": true
29-
},
30-
"updated_at": {
31-
"strip": true
32-
},
33-
"updated_by": {
34-
"strip": true
3520
}
3621
}
3722
}

0 commit comments

Comments
 (0)