Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dekelev committed May 15, 2021
1 parent ba8b0b8 commit f2c8c66
Show file tree
Hide file tree
Showing 3 changed files with 6,587 additions and 970 deletions.
8 changes: 4 additions & 4 deletions lib/express-cassandra-swagger.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const _ = require('lodash');
const yaml = require('js-yaml');
const validate = require('validation-utils').validationHelper;
const { validateNotEmpty } = require('validation-utils');

const modelTransformer = require('./transformers/model.schema.transformer');
const yamlWriter = require('./utils/yaml.writer');
Expand Down Expand Up @@ -40,7 +40,7 @@ function generateSchema(modelParam, opts = {}) {
* @returns {GeneratedSwagger[]} generated JSON schemas as objects
*/
function generateSchemaRaw(modelParam, opts = {}) {
validate.notNil(modelParam, 'modelParam is mandatory');
validateNotEmpty(modelParam, 'modelParam is mandatory');

let models;
if (_.isArray(modelParam)) {
Expand Down Expand Up @@ -73,8 +73,8 @@ function generateSchemaRaw(modelParam, opts = {}) {
* @returns {Promise} - promise that is resolved after schemas are written
*/
function saveSchema(modelParam, targetDir, opts = {}) {
validate.notNil(modelParam, 'modelParam is mandatory');
validate.notNil(targetDir, 'targetDir is mandatory');
validateNotEmpty(modelParam, 'modelParam is mandatory');
validateNotEmpty(targetDir, 'targetDir is mandatory');

const yamlSchemaContainers = generateSchema(modelParam, opts);
return yamlWriter.writeYamlsToFs(yamlSchemaContainers, targetDir, opts);
Expand Down

0 comments on commit f2c8c66

Please sign in to comment.