Swagger-editor: Extract spec validation onto a separate package

Created on 20 Aug 2019  路  2Comments  路  Source: swagger-api/swagger-editor

Hi there,

Seems like the spec validation in swagger-editor is one of the most matures available in the ecosystem at the moment as well as the only one supporting OA3.

Would you consider having it on a separate NPM package with a proper API to be consumed by others?

Ideally we would like to see a validate function exposed that takes a spec as an argument and returns a list of errors, both schema errors and semantic errors. Especially semantic errors, as the schema validation is already covered by other tools and this is where the swagger-editor validation shines above everybody else.

Any chance this could be considered?

Thanks!

All 2 comments

You bring up a great suggestion which is a challenge for many open source projects. Ideally, externalizing a component and make it a separate library can help a lot of other projects. The cost of it, though, is maintenance. When a module is extracted and start being used standalone - it requires it's own build process, it's own APIs maintained, versioning, releases, _user requests_, and so on. All those bring an overhead that unfortunately we cannot afford right now.

We're facing a similar situation with one of our Java projects, and I wish we were able to push that one forward too.

So to answer your question - could this be considered? Yes. But unfortunately, not soon.

Was this page helpful?
0 / 5 - 0 ratings