Skip to content

Commit

Permalink
Merge 9c1cbed into f35f55c
Browse files Browse the repository at this point in the history
  • Loading branch information
denschub committed Jan 25, 2020
2 parents f35f55c + 9c1cbed commit 5f3ee26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/presenters/photo_presenter.rb
Expand Up @@ -12,7 +12,8 @@ def base_hash
sizes: {
small: url(:thumb_small),
medium: url(:thumb_medium),
large: url(:scaled_full)
large: url(:scaled_full),
raw: url
}
}
end
Expand All @@ -26,7 +27,8 @@ def as_api_json(full=false)
sizes: {
small: url(:thumb_small),
medium: url(:thumb_medium),
large: url(:scaled_full)
large: url(:scaled_full),
raw: url
}
}

Expand Down
5 changes: 3 additions & 2 deletions lib/schemas/api_v1.json
Expand Up @@ -205,12 +205,13 @@
"photo_sizes": {
"type": "object",
"properties": {
"raw": { "$ref": "#/definitions/url" },
"large": { "$ref": "#/definitions/url" },
"medium": { "$ref": "#/definitions/url" },
"small": { "$ref": "#/definitions/url" }
},
"required": ["large", "medium", "small"],
"additionalProperties": true
"required": ["raw", "large", "medium", "small"],
"additionalProperties": false
},

"photo_dimensions": {
Expand Down
1 change: 1 addition & 0 deletions spec/presenters/photo_presenter_spec.rb
Expand Up @@ -34,6 +34,7 @@ def confirm_photo_format(photo, ref_photo)
expect(photo[:sizes][:small]).to be_truthy
expect(photo[:sizes][:medium]).to be_truthy
expect(photo[:sizes][:large]).to be_truthy
expect(photo[:sizes][:raw]).to be_truthy
end
# rubocop:enable Metrics/AbcSize
end

0 comments on commit 5f3ee26

Please sign in to comment.