Class: Swagger::Blocks::ResourceListingAuthorizationNode
- Defined in:
- lib/swagger/blocks.rb
Overview
NOTE: in the spec this is different than API Declaration authorization. goo.gl/PvwUXj#515-authorization-object
Constant Summary collapse
- GRANT_TYPES =
[:implicit, :authorization_code].freeze
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
Instance Method Details
#grant_type(name, &block) ⇒ Object
218 219 220 221 222 223 |
# File 'lib/swagger/blocks.rb', line 218 def grant_type(name, &block) raise ArgumentError.new("#{name} not in #{GRANT_TYPES}") if !GRANT_TYPES.include?(name) self.data[:grantTypes] ||= Swagger::Blocks::GrantTypesNode.new self.data[:grantTypes].implicit(&block) if name == :implicit self.data[:grantTypes].(&block) if name == :authorization_code end |