Skip to content

Create a Joi schema from an Open API Specification

Notifications You must be signed in to change notification settings

JoeScho/oas2joi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Create a Joi schema from an Open API Specification

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •