Class: Eazypi::SecurityRequirement

Inherits:
Object
  • Object
show all
Defined in:
lib/eazypi/security_requirement.rb

Overview

Security Requirement OpenAPI object

Instance Method Summary collapse

Constructor Details

#initialize(name, scopes = []) ⇒ SecurityRequirement

Returns a new instance of SecurityRequirement.



6
7
8
9
# File 'lib/eazypi/security_requirement.rb', line 6

def initialize(name, scopes = [])
  @name = name
  @scopes = scopes
end

Instance Method Details

#to_openapi_specObject



11
12
13
14
15
# File 'lib/eazypi/security_requirement.rb', line 11

def to_openapi_spec
  {
    @name => @scopes
  }
end