Sha256: c0d940c2d4ab6586ff05f22581f4870cfea2f012b7703ccdb214d5a7a41822ad

Contents?: true

Size: 1.29 KB

Versions: 14

Compression:

Stored size: 1.29 KB

Contents

module ActivityNotification
  module Swagger::ErrorResponses #:nodoc:
    module InvalidParameterError #:nodoc:
      def self.extended(base)
        base.response 400 do
          key :description, "Invalid parameter"
          content 'application/json' do
            schema do
              key :'$ref', :Error
            end
          end
        end
      end
    end

    module ForbiddenError #:nodoc:
      def self.extended(base)
        base.response 403 do
          key :description, "Forbidden because of invalid parameter"
          content 'application/json' do
            schema do
              key :'$ref', :Error
            end
          end
        end
      end
    end

    module ResourceNotFoundError #:nodoc:
      def self.extended(base)
        base.response 404 do
          key :description, "Resource not found"
          content 'application/json' do
            schema do
              key :'$ref', :Error
            end
          end
        end
      end
    end

    module UnprocessableEntityError #:nodoc:
      def self.extended(base)
        base.response 422 do
          key :description, "Unprocessable entity"
          content 'application/json' do
            schema do
              key :'$ref', :Error
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
activity_notification-2.3.3 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.3.2 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.3.1 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.3.0 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.2.4 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.2.3 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.2.2 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.2.1 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.2.0 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.1.4 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.1.3 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.1.2 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.1.1 lib/activity_notification/controllers/concerns/swagger/error_responses.rb
activity_notification-2.1.0 lib/activity_notification/controllers/concerns/swagger/error_responses.rb