Module: Spikard::SecuritySchemeInfo
- Extended by:
- T::Helpers, T::Sig
- Included in:
- SecuritySchemeInfoApiKey, SecuritySchemeInfoHttp
- Defined in:
- lib/spikard/native.rb
Overview
Security scheme types
Class Method Summary collapse
Class Method Details
.from_hash(hash) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/spikard/native.rb', line 23 def self.from_hash(hash) discriminator = hash[:type] || hash['type'] case discriminator when 'http' then SecuritySchemeInfoHttp.from_hash(hash) when 'apiKey' then SecuritySchemeInfoApiKey.from_hash(hash) else raise "Unknown discriminator: #{discriminator}" end end |