Schema
/ API Reference / Validators
Schema
/ API Reference / Validators

isValidNumberSchema

A function that checks whether a given JSON schema is a valid JSON number schema.

The Gist

import { isValidNumberSchema, T_JSONSchema } from '@weser/schema'

const schema: T_JSONSchema = {
  type: 'number',
}

const isValid = isValidNumberSchema(schema)

Parameters

ParameterTypeDescription
schemaT_JSONSchemaThe JSON schema to check.

Returns

(boolean) Whether the schema is a valid JSON number schema.

On this page