NAME

OpenAPI::Generator::From::Definitions - Generate openapi single definition from several definitions in yaml or json!

SYNOPSIS

You probably want to use it from OpenAPI::Generator's exported subroutine called 'openapi_from':

use OpenAPI::Generator;

my $openapi_def = openapi_from(definitions => {src => 'definitions/', definitions => @additional_definitions});

But also you can use it directly:

use OpenAPI::Generator::From::Definitions;

my $generator = OpenAPI::Generator::From::Definitions->new;
my $openapi_def = $generator->generate({src => 'definitions/'})

METHODS

new()

Creates new instance of class

my $generator = OpenAPI::Generator::From::Definitions->new
generate($conf)

Using directory (will look for files ending with .json, .yaml or .yml)

$generator->generate({src => 'definitions/'});

Using array of hashes (definitions)

$generator->generate({definitions => @definitions});

Both options can be combined

OPTIONS

src

File path to file/directory of definitions to read from

definitions

Array of hashes, containing OpenAPI definitions

AUTHOR

Anton Fedotov, <tosha.fedotov.2000 at gmail.com>

BUGS

Please report any bugs or feature requests to https://github.com/doojonio/OpenAPI-Generator/issues

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc OpenAPI::Generator

LICENSE AND COPYRIGHT

This software is Copyright (c) 2021 by Anton Fedotov.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)