swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

Extract spec validation onto a separate package

Open mauriedo opened this issue 6 years ago • 3 comments

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!

mauriedo avatar Aug 20 '19 07:08 mauriedo

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.

webron avatar Aug 20 '19 20:08 webron

Related:

  • https://github.com/swagger-api/swagger-editor/issues/1629
  • https://github.com/swagger-api/swagger-editor/issues/1247

shockey avatar Aug 20 '19 21:08 shockey

Hi , any update on this for 2023 ?

dansnellgrove avatar Jan 12 '23 10:01 dansnellgrove