Schema
/ API Reference / Builders
Schema
/ API Reference / Builders

createBooleanSchema

A function that creates a JSON boolean schema.

The Gist

import { createBooleanSchema } from '@weser/schema'

const schema = createBooleanSchema()
const schemaWithOptions = createBooleanSchema({
  default: true,
})

Parameters

ParameterTypeDescription
optionsOptions?The options for the boolean schema.

Options

ParameterTypeDescription
descriptionstring?The description of the boolean schema.
defaultboolean?The default value of the boolean schema.
On this page