lib/lurker/json/schema/response_codes.rb in lurker-0.6.3 vs lib/lurker/json/schema/response_codes.rb in lurker-0.6.4
- old
+ new
@@ -1,21 +1,20 @@
module Lurker
module Json
class ResponseCodes < Schema
STATUS = 'status'.freeze
SUCCESSFUL = 'successful'.freeze
- DESCRIPTION = 'description'.freeze
def initialize(schema, options = {})
@parent_property = 'responseCodes'
super
end
def merge!(status_code, successful)
return if exists?(status_code, successful)
- payload = {STATUS => status_code, SUCCESSFUL => successful, DESCRIPTION => ''}
+ payload = {STATUS => status_code, SUCCESSFUL => successful, Json::DESCRIPTION => ''}
@schema << Lurker::Json::Parser.plain(root_schema: root_schema).parse(payload)
end
def validate!(status_code, successful)
return if exists?(status_code, successful)