UNPKG

json-schema-for-openapi

Version:

Converts a regular JSON Schema to a compatible OpenAPI 3.0.X Schema Object

15 lines (10 loc) 289 B
'use strict' const Convertor = require('./Convertor') class SchemaFactory { constructor() {} static convert(schema, name = 'mainSchema') { const convertedSchema = new Convertor(schema) return convertedSchema.convert(name) } } module.exports = SchemaFactory