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

Deprecating swagger-tools

Open whitlockjc opened this issue 8 years ago • 27 comments

For over a year now, the need to rewrite swagger-tools has been apparent. Not only that but swagger-tools doesn't exactly adhere to the NPM best practices where each module do one specific thing since swagger-tools is an API, a CLI and Middleware. Lastly, swagger-tools started with Swagger 1.2 support and was adapted to support Swagger 2.0. This last piece is what has caused a lot of code cruft, architectural hardships, etc. It is also this last piece that is making supporting swagger-tools harder.

That being said, the plan is to deprecate swagger-tools as-is and replace each of the individual components of swagger-tools with specific NPM modules:

  • API: https://github.com/apigee-127/sway _(This is a _real* API that makes Swagger integrations simpler. Sway is already used by swagger-editor and swagger-node, although they use very old versions, and 1.0.0 has been ready for weeks and is just waiting on sway-connect to be completed to flush out any remaining bugs.)*
  • CLI: https://github.com/whitlockjc/swagger-lint (Breaking the CLI out allows us to use Sway's custom validators to do ESLint style rules.)
  • Middleware: https://github.com/apigee-127/sway-connect (The plan is to have middleware that could be a drop-in replacement for swagger-tools' middleware but architected from the start as it works now, but with the swagger-tools bugs/features fixed/implemented)

I realize that this might come as a shock to some but I've been talking about this for quite some time. Issues like #327, #227 and others have mention of this plan in it as well. Without a rewrite, swagger-tools just can't fix some of these bugs and rewriting software that's already been replaced makes no sense. I welcome your feedback.

whitlockjc avatar Feb 03 '16 16:02 whitlockjc