Schema
/ API Reference / ValidatorsSchema
/ API Reference / ValidatorsisValidObjectSchema
A function that checks whether a given JSON schema is a valid JSON object schema.
The Gist
import { isValidObjectSchema, T_JSONSchema } from '@weser/schema'
const schema: T_JSONSchema = {
type: 'object',
properties: {
name: { type: 'string' },
},
}
const isValid = isValidObjectSchema(schema)
Parameters
Parameter | Type | Description |
---|---|---|
schema | T_JSONSchema | The JSON schema to check. |
Returns
(boolean
) Whether the schema is a valid JSON object schema.
© 2024-present Robin Weser. All Rights Reserved.