UNPKG

@techntools/sequelize-to-openapi

Version:
21 lines 662 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class AttributeValidator { map(properties, strategy) { if (!properties.validate) return; let result = {}; let attributeType = properties && properties.type && properties.type['key']; switch (attributeType) { case 'INTEGER': case 'STRING': result = strategy.getPropertiesForValidate(properties.validate); break; default: break; } return result; } } exports.default = AttributeValidator; //# sourceMappingURL=attribute-validator.js.map