Releases: fastify/fluent-json-schema
Releases · fastify/fluent-json-schema
v1.0.0
v0.10.0
v0.9.0
v0.8.0
v0.7.7
v0.7.5
v0.7.4
Features
Added a property isFluentSchema
in every FluentSchema object.
const S = require('fluent-schema')
const schema = S.object()
.prop('foo', S.string())
.prop('bar', S.number())
console.log(schema.isFliuentSchema) // true
The previous method based on Symbol.for('fluent-schema-object')
has been deprecated but it still available
v0.7.3
v0.7.2
v0.7.0
Removed type string as the default value when a prop is created
S.object().prop('foo')
was generating this schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"foo": {
"type": "string",
}
}
}
now it returns this one:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"foo": {}
}
}
which is correct because a prop without a type
accepts any
, not a string