NAME

Swagger::Schema::V3 - Object access to OpenAPI V3 schema files

SYNOPSIS

use File::Slurp;
my $data = read_file($swagger_file);
my $schema = Swagger::Schema::V3->MooseX::DataModel::new_from_json($data);
# use the object model
say "This API consists of:";
foreach my $path (sort keys %{ $schema->paths }){
  foreach my $http_verb (sort keys %{ $schema->paths->{ $path } }) {
    say "$http_verb on $path";
  }
}

DESCRIPTION

Get programmatic access to an OpenAPI V3 file.

If you're trying to parse a V2 file, take a look at Swagger::Schema

OBJECT MODEL

The object model is defined with MooseX::DataModel. Take a look at the lib/Swagger/Schema/V3.pm file or the swagger spec https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md to know what you can find inside the objects

SEE ALSO

https://github.com/OAI/OpenAPI-Specification

http://swagger.io

AUTHOR

Jose Luis Martinez
CAPSiDE
jlmartinez@capside.com

BUGS and SOURCE

The source code is located here: https://github.com/pplu/swagger-schema-perl

Please report bugs to: https://github.com/pplu/swagger-schema-perl/issues

COPYRIGHT and LICENSE

Copyright (c) 2015 by CAPSiDE

This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.