[dancer-users] Introducing new plugin for Dancer2: Swagger2

Daniel Böhmer post at daniel-boehmer.de
Wed Mar 16 14:31:15 GMT 2016


Hello Dancer folks,

as recently announced I got the permission to upload one of my
Perl modules to CPAN and did so during the German Perl Workshop.
Unfortunately I've been sick over the last week and didn't have
the chance to tell you about it in the workshop.

So I want to describe it via e-mail:

https://metacpan.org/pod/Dancer2::Plugin::Swagger2

There is a fully functional example in the SYNOPSIS section
that displays the whole point: Define paths of your REST API
in the generic Swagger alias OpenAPI specification format.
Then throw that file onto Dancer2 and get input validation,
output validation and route creation for free.

As our own application is still in development we turned off
validation there for now. So I have to admit that validation
is still a bit flaky and not well tested. In fact I stole
much of the logic from Mojolicious::Plugin::Swagger2 without
understanding all of it.

Any users, testers or contributors are welcome. I hope to
get some feedback via e-mail or on Github. When you're going
to develop your next REST API be sure to write a specification
in Swagger/OpenAPI format and if you did so, you can also
speed up the implementation in Dancer2 with this plugin!

Kind regards
Daniel Böhmer



More information about the dancer-users mailing list