summaryrefslogblamecommitdiff
path: root/lib/Net/HTTP/Spore/Role/Description.pm
blob: cad1084ead89e2b723509bac305715ae0e31051d (plain) (tree)
1
2
3
4
5
6
7
8
9




                                            
                                      
                               
                                              
 
                 





                     
                
                      
                          
                               

  
                       
                      
                         
                                      
                   

  

                        
                        



                          
  
package Net::HTTP::Spore::Role::Description;

# ABSTRACT: attributes for API description

use Moose::Role;
use MooseX::Types::Moose qw/ArrayRef/;
use MooseX::Types::URI qw/Uri/;
use Net::HTTP::Spore::Meta::Types qw/Boolean/;

has base_url => (
    is       => 'rw',
    isa      => Uri,
    coerce   => 1,
    required => 1,
);

has formats => (
    is        => 'rw',
    isa       => ArrayRef,
    predicate => 'has_formats',
);

has authentication => (
    is        => 'rw',
    isa       => Boolean,
    predicate => 'has_authentication',
    coerce    => 1,
);

has expected_status => (
    is      => 'rw',
    isa     => ArrayRef,
    lazy    => 1,
    default => sub { [] },
);

1;