-
-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathapp.ex
37 lines (36 loc) · 1.06 KB
/
app.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.App do
alias OpenApiSpex.Schema
alias PlexusWeb.API.V1.Schemas.AverageScores
require OpenApiSpex
OpenApiSpex.schema(%{
title: "App",
description: "A Representation of an App",
type: :object,
properties: %{
name: %Schema{type: :string, description: "Name"},
package: %Schema{type: :string, description: "App Package"},
icon_url: %Schema{type: :string, description: "URL of Icon"},
scores: AverageScores
},
example: %{
"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