Skip to content

Commit

Permalink
fix: old UnproccesableError class does not work across alias
Browse files Browse the repository at this point in the history
  • Loading branch information
artofhuman committed Jan 11, 2017
1 parent dac3ab4 commit 6da5c9c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if RUBY_VERSION < '2'
gem 'public_suffix', '< 1.5.0'
gem 'pg', '< 0.19.0'
gem "pry-debugger", ">= 0.2.3"
gem 'nokogiri', '< 1.7.0'
else
gem "test-unit"
gem "pry-byebug"
Expand Down
15 changes: 14 additions & 1 deletion app/docs/swagger/v1/models/apress/api/unproccesable_error.rb
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
Swagger::V1::Models::Apress::Api::UnproccesableError = Swagger::V1::Models::Apress::Api::UnprocessableError
module Swagger
module V1
module Models
module Apress
module Api
# Deprecated: Please use `UnprocessableError` instead
class UnproccesableError < ::Apress::Api::Swagger::Schema
include UnprocessableError::Schema
end
end
end
end
end
end
24 changes: 16 additions & 8 deletions app/docs/swagger/v1/models/apress/api/unprocessable_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ module Models
module Apress
module Api
class UnprocessableError < ::Apress::Api::Swagger::Schema
swagger_schema name.to_sym do
key :required, :errors
module Schema
extend ActiveSupport::Concern

property :errors do
key :type, :array
items do
key :type, :object
property :error do
key :type, :object
included do
swagger_schema name.to_sym do
key :required, :errors

property :errors do
key :type, :array
items do
key :type, :object
property :error do
key :type, :object
end
end
end
end
end
end

include Schema
end
end
end
Expand Down

0 comments on commit 6da5c9c

Please sign in to comment.