Sha256: 60d03cc239df5e544b75f3e61f799b44fa26e8cbabd005ca65c3d97f543f4a09

Contents?: true

Size: 928 Bytes

Versions: 2

Compression:

Stored size: 928 Bytes

Contents

# frozen_string_literal: true

require "openapi3_parser/node/security_scheme"
require "openapi3_parser/node_factory/oauth_flows"
require "openapi3_parser/node_factory/object"
require "openapi3_parser/node_factory/optional_reference"

module Openapi3Parser
  module NodeFactory
    class SecurityScheme < NodeFactory::Object
      allow_extensions

      field "type", input_type: String, required: true
      field "description", input_type: String
      field "name", input_type: String
      field "in", input_type: String
      field "scheme", input_type: String
      field "bearerFormat", input_type: String
      field "flows", factory: :flows_factory
      field "openIdConnectUrl", input_type: String

      private

      def build_object(data, context)
        Node::SecurityScheme.new(data, context)
      end

      def flows_factory(context)
        NodeFactory::OauthFlows.new(context)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
openapi3_parser-0.5.1 lib/openapi3_parser/node_factory/security_scheme.rb
openapi3_parser-0.5.0 lib/openapi3_parser/node_factory/security_scheme.rb