oas2joi

2.0.2 • Public • Published

oas2joi

Returns an object containing Joi schemas for every schema present in an Open API 3 Yaml document.

Usage

npm i oas2joi
const oas2joi = require('oas2joi');
const Joi = require('@hapi/joi');

const schemas = oas2joi('./path/to/open-api.yml');

const someObject = {
  foo: 'bar'
};

const { error } = Joi.validate(someObject, schemas.someObject);

Contributors

Package Sidebar

Install

npm i oas2joi

Weekly Downloads

3

Version

2.0.2

License

MIT

Unpacked Size

3.52 kB

Total Files

5

Last publish

Collaborators

  • joescho