UNPKG

@nahkies/typescript-fetch-runtime

Version:

Runtime package for code generated by @nahkies/openapi-code-generator using the typescript-fetch template

14 lines 553 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.responseValidationFactory = responseValidationFactory; const common_1 = require("./common"); function responseValidationFactory(possibleResponses, defaultResponse) { return (0, common_1.responseValidationFactoryFactory)((schema, value) => { const result = schema.validate(value); if (result.error) { throw result.error; } return result.value; }, possibleResponses, defaultResponse); } //# sourceMappingURL=joi.js.map