The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

    Mojolicious::Plugin::SwaggerUI - Swagger UI plugin for Mojolicious

SYNOPSIS

    # Mojolicious Lite
    plugin 'SwaggerUI' => {
        route => app->routes()->any('/swagger'),
        url => '/swagger.json',
    };

DESCRIPTION

The plugin allows you to run the Swagger UI component inside your Mojolicious application.

Screenshot

OPTIONS

route

    plugin 'SwaggerUI' => { 
        route => app()->routes()->any('/swagger') 
    };

Route for the swagger-ui component. It defaults to a any route on /swagger-ui

url

    plugin 'SwaggerUI' => {
        url => '/swagger.json'
    };

Url for the JSON Swagger specification. It defaults to /v1.

Mojolicious::Plugin::OpenAPI can expose the JSON Swagger spec under the base path route. You can poijust point the path in her and it will automatically work.

AUTHOR

Tudor Marghidanu tudor@marghidanu.com

COPYRIGHT AND LICENSE

Copyright (C) 2019, Tudor Marghidanu.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.