NAME
Raisin::Plugin::Swagger - Generate API documentation.
SYNOPSIS
plugin 'Swagger';
DESCRIPTION
Generates a Swagger compatible API documentaion.
Provides a documentation by /swagger.json
URL. You can use this url in Swagger UI.
CORS
Enables a cross-origin resource sharing.
plugin 'Swagger', enable => 'CORS';
VERSION
Which Swagger version to use. By default 2.0 is used, also 1.2 available.
plugin 'Swagger', version => 1.2;
For Swagger 1.2 there is another URL: /api-docs
.
FUNCTIONS
swagger_setup
Not available for Swagger 1.2.
swagger_setup(
title => 'BatAPI',
description => 'Simple BatAPI.',
contact => {
name => 'Bruce Wayne',
url => 'http://wayne.enterprises',
email => 'bruce@batman.com',
},
license => {
name => 'Batman license',
url => 'http://wayne.enterprises/licenses/',
},
);
title, description, terms_of_service
contact: name, url, email
license: name, url
AUTHOR
Artur Khabibullin - rtkh <at> cpan.org
LICENSE
This module and all the modules in this package are governed by the same license as Perl itself.