Schema
/ API Reference / BuildersSchema
/ API Reference / BuilderscreateBooleanSchema
A function that creates a JSON boolean schema.
The Gist
import { createBooleanSchema } from '@weser/schema'
const schema = createBooleanSchema()
const schemaWithOptions = createBooleanSchema({
default: true,
})
Parameters
| Parameter | Type | Description |
|---|---|---|
| options | Options? | The options for the boolean schema. |
Options
| Parameter | Type | Description |
|---|---|---|
| description | string? | The description of the boolean schema. |
| default | boolean? | The default value of the boolean schema. |
© 2024-present Robin Weser. All Rights Reserved.