lib/swagger_yard/configuration.rb in swagger_yard-0.4.4 vs lib/swagger_yard/configuration.rb in swagger_yard-1.0.0
- old
+ new
@@ -1,20 +1,23 @@
module SwaggerYard
class Configuration
attr_accessor :api_version, :api_base_path
attr_accessor :swagger_version
attr_accessor :title, :description
- attr_accessor :enable, :reload
attr_accessor :controller_path, :model_path
attr_accessor :path_discovery_function
attr_accessor :security_definitions
+ # openapi-compatible names
+ alias openapi_version swagger_version
+ alias openapi_version= swagger_version=
+ alias security_schemes security_definitions
+ alias security_schemes= security_definitions=
+
def initialize
@swagger_version = "2.0"
@api_version = "0.1"
- @enable = false
- @reload = true
@title = "Configure title with SwaggerYard.config.title"
@description = "Configure description with SwaggerYard.config.description"
@security_definitions = {}
@external_schema = {}
end
@@ -22,16 +25,8 @@
def external_schema(mappings = nil)
mappings.each do |prefix, url|
@external_schema[prefix.to_s] = url
end if mappings
@external_schema
- end
-
- def swagger_spec_base_path=(ignored)
- warn "DEPRECATED: swagger_spec_base_path is no longer necessary."
- end
-
- def api_path=(ignored)
- warn "DEPRECATED: api_path is no longer necessary."
end
end
end