You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 993ab7c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: database.schema.json
+62-53Lines changed: 62 additions & 53 deletions
Original file line number
Diff line number
Diff line change
@@ -103,14 +103,14 @@
103
103
"general",
104
104
"programming-language-design",
105
105
"git",
106
-
"python",
106
+
"clojure",
107
+
"cpp",
108
+
"java",
107
109
"rust",
108
110
"sql",
109
-
"cpp",
110
-
"clojure",
111
111
"php",
112
+
"python",
112
113
"kotlin",
113
-
"java",
114
114
"haskell"
115
115
],
116
116
"description": "The unique identifier of the entity"
@@ -171,65 +171,22 @@
171
171
"general",
172
172
"programming-language-design",
173
173
"git",
174
-
"python",
174
+
"clojure",
175
+
"cpp",
176
+
"java",
175
177
"rust",
176
178
"sql",
177
-
"cpp",
178
-
"clojure",
179
179
"php",
180
+
"python",
180
181
"kotlin",
181
-
"java",
182
182
"haskell"
183
183
]
184
184
},
185
185
"description": "The topics that this resource teaches."
186
186
},
187
187
"pricing": {
188
-
"oneOf": [
189
-
{
190
-
"type": "object",
191
-
"properties": {
192
-
"model": {
193
-
"type": "string",
194
-
"enum": [
195
-
"Free",
196
-
"Freemium"
197
-
],
198
-
"description": "The Free(mium) Pricing Model of this resource. 'Free' should be used for resources where 100% (or close) of the content is free. 'Freemium' describes a pricing model where the core content is available for free, but features paid extensions. If the resource has a freemium model but the free portion is very limited, consider using 'Paid' instead and providing an estimated price for the full version. "
199
-
}
200
-
},
201
-
"required": [
202
-
"model"
203
-
],
204
-
"additionalProperties": false,
205
-
"description": "FreeFreemiumPricing"
206
-
},
207
-
{
208
-
"type": "object",
209
-
"properties": {
210
-
"model": {
211
-
"type": "string",
212
-
"enum": [
213
-
"Subscription",
214
-
"One Time"
215
-
],
216
-
"description": "The Paid Pricing Model of this resource. 'Subscription' means the resource is paid on a recurring basis (e.g. monthly or yearly), while 'One Time' means the resource is paid with a single upfront payment. If the price varies or is not fixed, provide a close approximation. Note that the subscription renewal cycle is not specified, so if the price has different renewal cycles, provide the most common or default one (usually monthly)."
217
-
},
218
-
"amount": {
219
-
"type": "number",
220
-
"exclusiveMinimum": 0,
221
-
"description": "The price of this resource, in US Dollars."
222
-
}
223
-
},
224
-
"required": [
225
-
"model",
226
-
"amount"
227
-
],
228
-
"additionalProperties": false,
229
-
"title": "PaidPricing"
230
-
}
231
-
],
232
-
"description": "Details about the cost of the resource."
188
+
"description": "Details about the cost of the resource.",
189
+
"$ref": "#/$defs/Pricing"
233
190
},
234
191
"pros": {
235
192
"description": "Array of pros for using the resource, e.g. 'explains difficult concepts with good analogies'",
@@ -263,5 +220,57 @@
263
220
"resources"
264
221
],
265
222
"additionalProperties": false,
223
+
"$defs": {
224
+
"FreePricing": {
225
+
"type": "object",
226
+
"properties": {
227
+
"model": {
228
+
"type": "string",
229
+
"enum": [
230
+
"Free",
231
+
"Freemium"
232
+
],
233
+
"description": "The Free(mium) Pricing Model of this resource. 'Free' should be used for resources where 100% (or close) of the content is free. 'Freemium' describes a pricing model where the core content is available for free, but features paid extensions. If the resource has a freemium model but the free portion is very limited, consider using 'Paid' instead and providing an estimated price for the full version. "
234
+
}
235
+
},
236
+
"required": [
237
+
"model"
238
+
],
239
+
"additionalProperties": false
240
+
},
241
+
"PaidPricing": {
242
+
"type": "object",
243
+
"properties": {
244
+
"model": {
245
+
"type": "string",
246
+
"enum": [
247
+
"Subscription",
248
+
"One Time"
249
+
],
250
+
"description": "The Paid Pricing Model of this resource. 'Subscription' means the resource is paid on a recurring basis (e.g. monthly or yearly), while 'One Time' means the resource is paid with a single upfront payment. If the price varies or is not fixed, provide a close approximation. Note that the subscription renewal cycle is not specified, so if the price has different renewal cycles, provide the most common or default one (usually monthly)."
251
+
},
252
+
"amount": {
253
+
"type": "number",
254
+
"exclusiveMinimum": 0,
255
+
"description": "The price of this resource, in US Dollars."
256
+
}
257
+
},
258
+
"required": [
259
+
"model",
260
+
"amount"
261
+
],
262
+
"additionalProperties": false
263
+
},
264
+
"Pricing": {
265
+
"oneOf": [
266
+
{
267
+
"$ref": "#/$defs/FreePricing"
268
+
},
269
+
{
270
+
"$ref": "#/$defs/PaidPricing"
271
+
}
272
+
]
273
+
}
274
+
},
266
275
"$comment": "// Generated by index.ts - DO NOT EDIT THIS FILE DIRECTLY"
"The Paid Pricing Model of this resource. 'Subscription' means the resource is paid on a recurring basis (e.g. monthly or yearly), while 'One Time' means the resource is paid with a single upfront payment. If the price varies or is not fixed, provide a close approximation. Note that the subscription renewal cycle is not specified, so if the price has different renewal cycles, provide the most common or default one (usually monthly).",
43
+
),
44
+
amount: z
45
+
.number()
46
+
.gt(0)
47
+
.describe("The price of this resource, in US Dollars."),
48
+
}).meta({id: "PaidPricing"});
49
+
50
+
constFreePricingSchema=z.strictObject({
51
+
model: z
52
+
.enum(["Free","Freemium"])
53
+
.describe(
54
+
"The Free(mium) Pricing Model of this resource. 'Free' should be used for resources where 100% (or close) of the content is free. 'Freemium' describes a pricing model where the core content is available for free, but features paid extensions. If the resource has a freemium model but the free portion is very limited, consider using 'Paid' instead and providing an estimated price for the full version. ",
55
+
),
56
+
}).meta({id: "FreePricing"});
57
+
37
58
/**
38
59
* The Pricing of a Resource, which can either be Free/Freemium or Paid (Subscription/One Time)
39
60
*/
40
61
constPricingSchema=z
41
62
.discriminatedUnion("model",[
42
-
z
43
-
.strictObject({
44
-
model: z
45
-
.enum(["Free","Freemium"])
46
-
.describe(
47
-
"The Free(mium) Pricing Model of this resource. 'Free' should be used for resources where 100% (or close) of the content is free. 'Freemium' describes a pricing model where the core content is available for free, but features paid extensions. If the resource has a freemium model but the free portion is very limited, consider using 'Paid' instead and providing an estimated price for the full version. ",
48
-
),
49
-
})
50
-
.describe("FreeFreemiumPricing"),
51
-
52
-
z.strictObject({
53
-
model: z
54
-
.enum(["Subscription","One Time"])
55
-
.describe(
56
-
"The Paid Pricing Model of this resource. 'Subscription' means the resource is paid on a recurring basis (e.g. monthly or yearly), while 'One Time' means the resource is paid with a single upfront payment. If the price varies or is not fixed, provide a close approximation. Note that the subscription renewal cycle is not specified, so if the price has different renewal cycles, provide the most common or default one (usually monthly).",
57
-
),
58
-
amount: z
59
-
.number()
60
-
.gt(0)
61
-
.describe("The price of this resource, in US Dollars."),
62
-
}).meta({title: "PaidPricing"}),
63
-
63
+
FreePricingSchema,
64
+
PaidPricingSchema,
64
65
])
66
+
.meta({id: "Pricing"})
65
67
.describe("Details about the cost of the resource.");
0 commit comments