Sha256: 2d56cb00847cbf4eb11c854acf1e04f56b2933e1558b5949776307b7cde3efd5

Contents?: true

Size: 958 Bytes

Versions: 9

Compression:

Stored size: 958 Bytes

Contents

# frozen_string_literal: true

require_relative 'schema/v3/object/public'

module R2OAS
  module PluggableConfiguration
    # rubocop:disable Style/MutableConstant
    DEFAULT_USE_OBJECT_CLASSES = {
      info_object: R2OAS::Schema::V3::InfoObject,
      paths_object: R2OAS::Schema::V3::PathsObject,
      path_item_object: R2OAS::Schema::V3::PathItemObject,
      external_document_object: R2OAS::Schema::V3::ExternalDocumentObject,
      components_object: R2OAS::Schema::V3::ComponentsObject,
      components_schema_object: R2OAS::Schema::V3::Components::SchemaObject,
      components_request_body_object: R2OAS::Schema::V3::Components::RequestBodyObject
    }
    # rubocop:enable Style/MutableConstant

    VALID_OPTIONS_KEYS = [
      :use_object_classes
    ].freeze

    attr_accessor *VALID_OPTIONS_KEYS

    private

    module_function

    def set_default(target)
      target.use_object_classes = DEFAULT_USE_OBJECT_CLASSES
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
r2-oas-0.3.4 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.3.3 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.3.2 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.3.1 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.3.0 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.2.0 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.1.3 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.1.2 lib/r2-oas/pluggable_configuration.rb
r2-oas-0.1.0 lib/r2-oas/pluggable_configuration.rb