lib/r2-oas/app_configuration.rb in r2-oas-0.3.4 vs lib/r2-oas/app_configuration.rb in r2-oas-0.4.0
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
require_relative 'app_configuration/server'
require_relative 'app_configuration/swagger'
require_relative 'app_configuration/tool'
+require_relative 'app_configuration/deprecation'
module R2OAS
module AppConfiguration
DEFAULT_VERSION = :v3
DEFAULT_ROOT_DIR_PATH = './oas_docs'
@@ -44,10 +45,15 @@
# rubocop:enable Style/MutableConstant
DEFAULT_TOOL = Tool.new
# :dot or :underbar
DEFAULT_NAMESPACE_TYPE = :dot
DEFAULT_DEPLOY_DIR_PATH = './deploy_docs'
+ EDFAULT_PLUGINS = [].freeze
+ DEFAULT_LOCAL_PLUGINS_DIR_NAME = 'plugins'
+ DEFAULT_LOCAL_TASKS_DIR_NAME = 'tasks'
+ DEFAULT_OUTPUT_PATH = './oas_docs/dist/oas_doc.yml'
+ DEFAULT_DEPRECATION = Deprecation.new
PUBLIC_VALID_OPTIONS_KEYS = %i[
version
root_dir_path
schema_save_dir_name
@@ -62,10 +68,15 @@
http_methods_when_generate_request_body
ignored_http_statuses_when_generate_component_schema
tool
namespace_type
deploy_dir_path
+ plugins
+ local_plugins_dir_name
+ local_tasks_dir_name
+ output_path
+ deprecation
].freeze
UNPUBLIC_VALID_OPTIONS_KEYS = %i[
paths_config
logger
@@ -98,8 +109,13 @@
target.tool = DEFAULT_TOOL
target.http_methods_when_generate_request_body = DEFAULT_HTTP_METHODS_WHEN_GENERATE_REQUEST_BODY
target.ignored_http_statuses_when_generate_component_schema = DEFAULT_IGNORED_HTTP_STATUSES_WHEN_GENERATE_COMPONENT_SCHEMA
target.namespace_type = DEFAULT_NAMESPACE_TYPE
target.deploy_dir_path = DEFAULT_DEPLOY_DIR_PATH
+ target.plugins = EDFAULT_PLUGINS
+ target.local_plugins_dir_name = DEFAULT_LOCAL_PLUGINS_DIR_NAME
+ target.local_tasks_dir_name = DEFAULT_LOCAL_TASKS_DIR_NAME
+ target.output_path = DEFAULT_OUTPUT_PATH
+ target.deprecation = DEFAULT_DEPRECATION
end
end
end