Skip to content

bponomarenko/openapi-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openapi-schema

A JSON Schema for OpenAPI Specification. Supports version 3.0.1.

Install via NPM

npm install --save openapi-schema

Usage

Example of OpenAPI specification validation with "ajv" NPM package:

const Ajv = require('ajv');
const schema = require('openapi-schema');

const ajv = new Ajv();
ajv.validate(schema, {
  openapi: '3.0.1',
  info: {
    title: 'Test spec',
    version: '1.0.0'
  }
});

Missing requirements

  • Parameter Object: "explode" – When style is form, the default value is true.
  • Schema Object: "items" – items MUST be present if the type is array.

License

MIT

About

A JSON Schema for OpenAPI Specification 3.0.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published