layout | title | nav_order | description | permalink |
---|---|---|---|---|
default |
Home |
1 |
yuptoswagger.js is a responsive Jekyll theme with built-in search that is easily customizable and hosted on GitHub Pages. |
/ |
$ npm install yuptoswagger.js
$ yarn add yuptoswagger.js
import * as yup from "yup";
import Compiler from "yuptoswagger.js";
// Initialize compiler
const options = {
debug: true
}
const compiler = new Compiler(options);
const schema = yup.object().shape({
first_name: yup.string().min(2).required(),
last_name: yup.string().min(2).required(),
email: yup.string().email().required(),
password: yup.string().min(8).required(),
})
const swagger = compiler.compile(schema);
{
type: 'object',
fields: [
{ type: 'string', enum: [], minLength: 2 },
{ type: 'string', enum: [], minLength: 2 },
{ type: 'string', enum: [], format: 'email' },
{ type: 'string', enum: [], minLength: 8 }
]
}
yuptoswagger.js is © 2022 by Gjergj Kadriu.
yuptoswagger.js is distributed by an MIT license.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. Read more about becoming a contributor in our GitHub repo.
yuptoswagger.js is committed to fostering a welcoming community.
View our Code of Conduct on our GitHub repository.