lib/r2-oas/schema/v3/generator/base_generator.rb in r2-oas-0.3.4 vs lib/r2-oas/schema/v3/generator/base_generator.rb in r2-oas-0.4.0
- old
+ new
@@ -1,10 +1,10 @@
# frozen_string_literal: true
require 'r2-oas/schema/v3/base'
require 'r2-oas/routing/parser'
-require 'r2-oas/schema/v3/object/openapi_object'
+require 'r2-oas/schema/v3/object/from_routes/openapi_object'
require 'r2-oas/schema/v3/manager/file/path_item_file_manager'
require 'r2-oas/store'
module R2OAS
module Schema
@@ -12,10 +12,15 @@
class BaseGenerator < Base
include Sortable
def initialize(options = {})
super
- @store = Store.create
+
+ options.keys.each do |key|
+ send("#{key}=", options[key])
+ end
+
+ @store = ::R2OAS::Store.create(:schema)
@glob_schema_paths = create_glob_schema_paths
end
private