We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b8ad67 commit a079b05Copy full SHA for a079b05
readme.md
@@ -211,11 +211,19 @@ import Schema from 'typebox/schema'
211
// Compile
212
// -------------------------------------------------------------------------------
213
214
-const User = Schema.Compile(Type.Object({
215
- id: Type.String(),
216
- name: Type.String(),
217
- email: Type.String({ format: 'email' })
218
-}))
+const User = Schema.Compile({
+ type: 'object',
+ properties: {
+ id: { type: 'string' },
+ name: { type: 'string' },
219
+ email: { type: 'string', format: 'email' }
220
+ },
221
+ required: [
222
+ 'id',
223
+ 'name',
224
+ 'email'
225
+ ]
226
+})
227
228
229
// Parse
0 commit comments