Files
openfoodnetwork/app/json_schemas/errors_schema.rb
Matt-Yorkley 76f14a03c6 Add specs and JSON schemas
Include test helpers
2022-03-02 11:55:46 +11:00

25 lines
470 B
Ruby

# frozen_string_literal: true
class ErrorsSchema
def self.schema
{
type: :object,
properties: {
errors: {
type: :array,
items: {
type: :object,
properties: {
title: { type: :string },
detail: { type: :string },
source: { type: :object }
},
required: [:detail]
}
}
},
required: [:errors]
}
end
end