class-validator-jsonschema
class-validator-jsonschema copied to clipboard
Convert class-validator-decorated classes into JSON schema
In [email protected] they are now using the latest json schema syntax and exclusiveMinimum and Maximum are now numbers: https://github.com/metadevpro/openapi3-ts/commit/e7a08516a86620a66a16f4552d5b9affd6c77987 This PR changes the default converters accordingly.
Imagine classes like these ```javascript @JSONSchema() class RichTextSchema extends BaseContentSchema { static collectionName: SchemaCollectionName = { plural: "RichTexts", singular: "RichText", }; @IsOptional() @IsString() text: string; } ``` ```javascript @JSONSchema() class...
Bumps [jsdom](https://github.com/jsdom/jsdom) from 16.4.0 to 16.7.0. Release notes Sourced from jsdom's releases. Version 16.7.0 Added AbortSignal.abort(). (ninevra) Added dummy x and y properties to the return value of getBoundingClientRect(). (eiko)...
I have encountered a problem. I have a Dto that has a field decorated by Exclude, but I don't want it to disappear from the JsonSchema. ```ts export class TerminalOptionsDto...
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1. Release notes Sourced from ansi-regex's releases. v5.0.1 Fixes (backport of 6.0.1 to v5) This is a backport of the minor ReDos vulnerability in ansi-regex@<6.0.1,...
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7. Release notes Sourced from node-fetch's releases. v2.6.7 Security patch release Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th...
I'm not sure whether this is part of as conditional decorator limitations in the readme. In any case... The `@IsOptional` decorator should be adding `anyOf: [{type: someType}, {type: 'null'}]` as...
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...
Hello, In your exemple you give: ```typescript import { IsOptional, IsString, MaxLength } from 'class-validator' import { validationMetadatasToSchemas } from 'class-validator-jsonschema' class BlogPost { @IsString() id: string @IsOptional() @MaxLength(20, {...
Regular expression for IS_DATE_STRING is has a dot that should be escaped and the time should be optional