UNPKG

@tsed/common

Version:
54 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Schema = void 0; const schema_1 = require("@tsed/schema"); /** * Write data formatted to JsonSchema. * * ::: warning * This decorator will be removed in v7. * For v6 user, use @@Schema@@ decorator from @tsed/schema. * ::: * * ## Example * * ```typescript * @Schema({title: "test"}) * class Model { * @Schema({formatMinimum: "1987-10-24"}) * @Format("date") * birthDate: Date * } * ``` * * Will produce: * * ```json * { * "type": "object", * "title": "test", * "properties": { * "birthdate": { * "type": "string", * "format": "date", * "formatMinimum": "1987-10-24" * } * } * } * ``` * * @param partialSchema * @decorator * @validation * @swagger * @schema * @classDecorator * @input * @ignore * @deprecated Since v6. Use @Schema decorator from @tsed/schema instead of. */ function Schema(partialSchema) { return schema_1.Schema(partialSchema); } exports.Schema = Schema; //# sourceMappingURL=schema.js.map