UNPKG

@rapharacing/schemas

Version:

OpenAPI to JSON Schema to be used with middy for CC response validation

27 lines (20 loc) 501 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSchema = void 0; /* eslint-disable global-require */ /* eslint-disable import/no-dynamic-require */ /* eslint-disable import/prefer-default-export */ /** * Returns a JSON Schema * * @method getSchema * @param {String} name - Schema name * @returns {Object} JSON Schema */ const getSchema = name => { const file = require(`./schemas/${name}.json`); return file; }; exports.getSchema = getSchema;