class-validator-jsonschema
Advanced tools
Changelog
[2.0.0-rc1] - 2020-05-01
Bump class-validator
peer dependency to ^0.12.0
- meaning we're no longer compatible with pre-0.12 versions of class-validator
!
validationMetadatasToSchemas
no longer takes a validationMetadatas
object as first argument. Instead the library now automatically grabs validationMetadatas
from getMetadataStorage()
under the hood.
This simplifies library usage from
const metadatas = (getFromContainer(MetadataStorage) as any).validationMetadatas
const schemas = validationMetadatasToSchemas(metadatas)
into plain
const schemas = validationMetadatasToSchemas()
You can still choose to override the default metadata storage using the optional options argument:
const schemas = validationMetadatasToSchemas({
classValidatorMetadataStorage: myCustomMetadataStorage
})