Skip to content

Commit 34811cf

Browse files
committed
Use Signal as example App
1 parent 356095c commit 34811cf

File tree

4 files changed

+34
-34
lines changed

4 files changed

+34
-34
lines changed

lib/plexus_web/controllers/api/v1/app_controller.ex

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ defmodule PlexusWeb.API.V1.AppController do
1414
operation :index,
1515
summary: "List Applications",
1616
parameters: [
17-
page: [in: :query, description: "Page number", type: :integer, example: 2],
17+
page: [in: :query, description: "Page number", type: :integer, example: 1],
1818
limit: [in: :query, description: "Max results per page", type: :integer, example: 25],
1919
scores: [in: :query, description: "Include scores", type: :boolean, example: true],
20-
q: [in: :query, description: "Search query", type: :string, example: "YouTube"]
20+
q: [in: :query, description: "Search query", type: :string, example: "Signal"]
2121
],
2222
responses: [
2323
ok: {"Applications", "application/json", AppsResponse}
@@ -55,12 +55,12 @@ defmodule PlexusWeb.API.V1.AppController do
5555
description: "App Package",
5656
type: :string,
5757
required: true,
58-
example: "com.google.android.youtube"
58+
example: "org.thoughtcrime.securesms"
5959
],
6060
scores: [in: :query, description: "Include scores", type: :boolean, example: true]
6161
],
6262
responses: [
63-
ok: {"Applications", "application/json", AppResponse}
63+
ok: {"Application", "application/json", AppResponse}
6464
]
6565

6666
def show(conn, %{"package" => package} = params) do

lib/plexus_web/controllers/api/v1/schemas/app.ex

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ defmodule PlexusWeb.API.V1.Schemas.App do
1414
scores: AverageScores
1515
},
1616
example: %{
17-
"name" => "YouTube Music",
18-
"package" => "com.google.android.youtube.tvmusic",
17+
"name" => "Signal",
18+
"package" => "org.thoughtcrime.securesms",
1919
"scores" => %{
2020
"native" => %{
2121
"rating_type" => "native",
22-
"numerator" => 1.2,
23-
"total_count" => 21,
24-
"denominator" => 4
22+
"numerator" => 3.86,
23+
"denominator" => 4,
24+
"total_count" => 28
2525
},
2626
"micro_g" => %{
2727
"rating_type" => "micro_g",
28-
"numerator" => 4.0,
29-
"total_count" => 44,
30-
"denominator" => 4
28+
"numerator" => 3.92,
29+
"denominator" => 4,
30+
"total_count" => 25
3131
}
3232
},
3333
"icon_url" =>
34-
"https://play-lh.googleusercontent.com/76AjYITcB0dI0sFqdQjNgXQxRMlDIswbp0BAU_O5Oob-73b6cqKggVlAiNXQAW5Bl1g"
34+
"https://play-lh.googleusercontent.com/jCln_XT8Ruzp7loH1S6yM-ZzzpLP1kZ3CCdXVEo0tP2w5HNtWQds6lo6aLxLIjiW_X8"
3535
}
3636
})
3737
end

lib/plexus_web/controllers/api/v1/schemas/app_response.ex

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ defmodule PlexusWeb.API.V1.Schemas.AppResponse do
44

55
OpenApiSpex.schema(%{
66
title: "AppResponse",
7-
description: "Response schema for an application",
7+
description: "Response Schema for an Application",
88
type: :object,
99
properties: %{
1010
data: App
1111
},
1212
example: %{
1313
"data" => [
1414
%{
15-
"name" => "YouTube Music",
16-
"package" => "com.google.android.youtube.tvmusic",
15+
"name" => "Signal",
16+
"package" => "org.thoughtcrime.securesms",
1717
"scores" => %{
1818
"native" => %{
1919
"rating_type" => "native",
20-
"numerator" => 1.2,
21-
"total_count" => 21,
22-
"denominator" => 4
20+
"numerator" => 3.86,
21+
"denominator" => 4,
22+
"total_count" => 28
2323
},
2424
"micro_g" => %{
2525
"rating_type" => "micro_g",
26-
"numerator" => 3.9,
27-
"total_count" => 44,
28-
"denominator" => 4
26+
"numerator" => 3.92,
27+
"denominator" => 4,
28+
"total_count" => 25
2929
}
3030
},
3131
"icon_url" =>
32-
"https://play-lh.googleusercontent.com/lMoItBgdPPVDJsNOVtP26EKHePkwBg-PkuY9NOrc-fumRtTFP4XhpUNk_22syN4Datc"
32+
"https://play-lh.googleusercontent.com/jCln_XT8Ruzp7loH1S6yM-ZzzpLP1kZ3CCdXVEo0tP2w5HNtWQds6lo6aLxLIjiW_X8"
3333
}
3434
]
3535
}

lib/plexus_web/controllers/api/v1/schemas/apps_response.ex

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule PlexusWeb.API.V1.Schemas.AppsResponse do
66

77
OpenApiSpex.schema(%{
88
title: "AppsResponse",
9-
description: "Response schema for a list of applications",
9+
description: "Response Schema for a List of Applications",
1010
type: :object,
1111
properties: %{
1212
data: %Schema{type: :array, items: App},
@@ -15,28 +15,28 @@ defmodule PlexusWeb.API.V1.Schemas.AppsResponse do
1515
example: %{
1616
"data" => [
1717
%{
18-
"name" => "YouTube Music",
19-
"package" => "com.google.android.youtube.tvmusic",
18+
"name" => "Signal",
19+
"package" => "org.thoughtcrime.securesms",
2020
"scores" => %{
2121
"native" => %{
2222
"rating_type" => "native",
23-
"numerator" => 1.1,
24-
"total_count" => 21,
25-
"denominator" => 4
23+
"numerator" => 3.86,
24+
"denominator" => 4,
25+
"total_count" => 28
2626
},
2727
"micro_g" => %{
2828
"rating_type" => "micro_g",
29-
"numerator" => 3.7,
30-
"total_count" => 43,
31-
"denominator" => 4
29+
"numerator" => 3.92,
30+
"denominator" => 4,
31+
"total_count" => 25
3232
}
3333
},
3434
"icon_url" =>
35-
"https://play-lh.googleusercontent.com/76AjYITcB0dI0sFqdQjNgXQxRMlDIswbp0BAU_O5Oob-73b6cqKggVlAiNXQAW5Bl1g"
35+
"https://play-lh.googleusercontent.com/jCln_XT8Ruzp7loH1S6yM-ZzzpLP1kZ3CCdXVEo0tP2w5HNtWQds6lo6aLxLIjiW_X8"
3636
}
3737
],
3838
"meta" => %{
39-
"page_number" => 3,
39+
"page_number" => 1,
4040
"limit" => 1,
4141
"total_count" => 420,
4242
"total_pages" => 69

0 commit comments

Comments
 (0)