Skip to content

yuptoswagger-js/yuptoswagger.js.docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.
/

yuptoswagger.js

Get started now


Getting started

Quick start: Using npm

$ npm install yuptoswagger.js

Quick start: Using yarn

$ yarn add yuptoswagger.js

yuptoswagger.js in action

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);

Output:

{
  type: 'object',
  fields: [
    { type: 'string', enum: [], minLength: 2 },
    { type: 'string', enum: [], minLength: 2 },
    { type: 'string', enum: [], format: 'email' },
    { type: 'string', enum: [], minLength: 8 }
  ]
}

Configure yuptoswagger.js


About the project

yuptoswagger.js is © 2022 by Gjergj Kadriu.

License

yuptoswagger.js is distributed by an MIT license.

Contributing

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.

Code of Conduct

yuptoswagger.js is committed to fostering a welcoming community.

View our Code of Conduct on our GitHub repository.

About

Documentation for the yuptoswagger.js library.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published