News for hackers. Stuff that matters.
Re:Problems with Swagger by metachris on Tuesday April 04, 2017 @04:01PM (#14036628)
I've implemented Swagger with several APIs and agree that it's crazy complex and time-consuming to write Swagger files manually.

I believe the best use-case for Swagger is to develop the API (perhaps just defining the routes with payload and response, but without controllers), and then auto-generating the Swagger files. This way the API consumers always have an up-to-date documentation, and there is only one place which represents the current state of the API.

Re:Problems with Swagger by blazespin on Wednesday April 05, 2017 @12:06AM (#14039567)
Swagger yaml is hard to write? Hmm.. relative to the code that services it or consumes it, I find its pretty trivial.
Re:Problems with Swagger by dvirsky on Tuesday April 04, 2017 @05:04PM (#14037196)
Exactly. I wrote a project (https://github.com/EverythingMe/vertex) where you define the API with a semi declarative syntax in Go, and it just translates to swagger so you can generate documentation and playgrounds effortlessly. It worked very well.