khrt / Raisin

Raisin - a REST API micro framework for Perl 🐫 🐪
61 stars 29 forks source link

Support enum values in swagger plugin #87

Closed mschout closed 4 years ago

mschout commented 4 years ago

This PR detects enums that are either made from Types::Standard::Enum, or enum() from Moose::Util::TypeConstraints, and sets the swagger type to type: string and adds enum: [ ... all possible values ] to the generated swagger.