Package Exports
- openapi-schema
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openapi-schema) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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