-
-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathapp_response.ex
37 lines (36 loc) · 992 Bytes
/
app_response.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
defmodule PlexusWeb.API.V1.Schemas.AppResponse do
alias PlexusWeb.API.V1.Schemas.App
require OpenApiSpex
OpenApiSpex.schema(%{
title: "AppResponse",
description: "Response Schema for an Application",
type: :object,
properties: %{
data: App
},
example: %{
"data" => [
%{
"name" => "Signal",
"package" => "org.thoughtcrime.securesms",
"scores" => %{
"native" => %{
"rating_type" => "native",
"numerator" => 3.86,
"denominator" => 4,
"total_count" => 28
},
"micro_g" => %{
"rating_type" => "micro_g",
"numerator" => 3.92,
"denominator" => 4,
"total_count" => 25
}
},
"icon_url" =>
"https://play-lh.googleusercontent.com/jCln_XT8Ruzp7loH1S6yM-ZzzpLP1kZ3CCdXVEo0tP2w5HNtWQds6lo6aLxLIjiW_X8"
}
]
}
})
end