JoeScho / oas2joi

Create a Joi schema from an Open API Specification
11 stars 2 forks source link

feature: support arbitrary use of $ref in the loaded spec #19

Closed iudex- closed 4 years ago

iudex- commented 4 years ago

Background

Fixing issue #9 and any $ref related issue in the input openapi spec.

This PR basically replaces js-yaml by swagger-parser, which can load a openapi yaml spec, deference $refs and outputs json schema, as js-yaml used to do.

Issue

9

Change Type

Checklist

Version

Using Semver versioning, what version number should be bumped for this change?

As the change require the getSchemas function to be async the exported function need to be async too, leading to a breaking api change :neutral_face:

JoeScho commented 4 years ago

This is great! Thanks @iudex-