API Specs: many dialyzer errors
Too many to include in a commit log Module instead of schema was being passed
This commit is contained in:
parent
4fc177eb46
commit
2de84e2e3b
|
@ -62,7 +62,7 @@ def with_relationships_param do
|
|||
Operation.parameter(
|
||||
:with_relationships,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Embed relationships into accounts. **If this parameter is not set account's `pleroma.relationship` is going to be `null`.**"
|
||||
)
|
||||
end
|
||||
|
|
|
@ -122,22 +122,27 @@ def statuses_operation do
|
|||
parameters:
|
||||
[
|
||||
%Reference{"$ref": "#/components/parameters/accountIdOrNickname"},
|
||||
Operation.parameter(:pinned, :query, BooleanLike, "Include only pinned statuses"),
|
||||
Operation.parameter(
|
||||
:pinned,
|
||||
:query,
|
||||
BooleanLike.schema(),
|
||||
"Include only pinned statuses"
|
||||
),
|
||||
Operation.parameter(:tagged, :query, :string, "With tag"),
|
||||
Operation.parameter(
|
||||
:only_media,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Include only statuses with media attached"
|
||||
),
|
||||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Include statuses from muted accounts."
|
||||
),
|
||||
Operation.parameter(:exclude_reblogs, :query, BooleanLike, "Exclude reblogs"),
|
||||
Operation.parameter(:exclude_replies, :query, BooleanLike, "Exclude replies"),
|
||||
Operation.parameter(:exclude_reblogs, :query, BooleanLike.schema(), "Exclude reblogs"),
|
||||
Operation.parameter(:exclude_replies, :query, BooleanLike.schema(), "Exclude replies"),
|
||||
Operation.parameter(
|
||||
:exclude_visibilities,
|
||||
:query,
|
||||
|
@ -147,7 +152,7 @@ def statuses_operation do
|
|||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Include reactions from muted accounts."
|
||||
)
|
||||
] ++ pagination_params(),
|
||||
|
|
|
@ -141,7 +141,7 @@ def report_state do
|
|||
end
|
||||
|
||||
def id_param do
|
||||
Operation.parameter(:id, :path, FlakeID, "Report ID",
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Report ID",
|
||||
example: "9umDrYheeY451cQnEe",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -137,7 +137,12 @@ def index_operation do
|
|||
"Deprecated due to no support for pagination. Using [/api/v2/pleroma/chats](#operation/ChatController.index2) instead is recommended.",
|
||||
operationId: "ChatController.index",
|
||||
parameters: [
|
||||
Operation.parameter(:with_muted, :query, BooleanLike, "Include chats from muted users")
|
||||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike.schema(),
|
||||
"Include chats from muted users"
|
||||
)
|
||||
],
|
||||
responses: %{
|
||||
200 => Operation.response("The chats of the user", "application/json", chats_response())
|
||||
|
@ -156,7 +161,12 @@ def index2_operation do
|
|||
summary: "Retrieve list of chats",
|
||||
operationId: "ChatController.index2",
|
||||
parameters: [
|
||||
Operation.parameter(:with_muted, :query, BooleanLike, "Include chats from muted users")
|
||||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike.schema(),
|
||||
"Include chats from muted users"
|
||||
)
|
||||
| pagination_params()
|
||||
],
|
||||
responses: %{
|
||||
|
|
|
@ -29,7 +29,7 @@ def index_operation do
|
|||
"Order by recent activity or account creation",
|
||||
required: nil
|
||||
),
|
||||
Operation.parameter(:local, :query, BooleanLike, "Include local users only")
|
||||
Operation.parameter(:local, :query, BooleanLike.schema(), "Include local users only")
|
||||
] ++ pagination_params(),
|
||||
responses: %{
|
||||
200 =>
|
||||
|
|
|
@ -21,7 +21,7 @@ def index_operation do
|
|||
summary:
|
||||
"Get an object of emoji to account mappings with accounts that reacted to the post",
|
||||
parameters: [
|
||||
Operation.parameter(:id, :path, FlakeID, "Status ID", required: true),
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Status ID", required: true),
|
||||
Operation.parameter(:emoji, :path, :string, "Filter by a single unicode emoji",
|
||||
required: nil
|
||||
),
|
||||
|
@ -45,7 +45,7 @@ def create_operation do
|
|||
tags: ["Emoji reactions"],
|
||||
summary: "React to a post with a unicode emoji",
|
||||
parameters: [
|
||||
Operation.parameter(:id, :path, FlakeID, "Status ID", required: true),
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Status ID", required: true),
|
||||
Operation.parameter(:emoji, :path, :string, "A single character unicode emoji",
|
||||
required: true
|
||||
)
|
||||
|
@ -64,7 +64,7 @@ def delete_operation do
|
|||
tags: ["Emoji reactions"],
|
||||
summary: "Remove a reaction to a post with a unicode emoji",
|
||||
parameters: [
|
||||
Operation.parameter(:id, :path, FlakeID, "Status ID", required: true),
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Status ID", required: true),
|
||||
Operation.parameter(:emoji, :path, :string, "A single character unicode emoji",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -62,7 +62,7 @@ def index_operation do
|
|||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Include the notifications from muted users"
|
||||
)
|
||||
] ++ pagination_params(),
|
||||
|
|
|
@ -142,7 +142,7 @@ def birthdays_operation do
|
|||
end
|
||||
|
||||
defp id_param do
|
||||
Operation.parameter(:id, :path, FlakeID, "Account ID",
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Account ID",
|
||||
example: "9umDrYheeY451cQnEe",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -37,7 +37,7 @@ def quotes_operation do
|
|||
end
|
||||
|
||||
def id_param do
|
||||
Operation.parameter(:id, :path, FlakeID, "Status ID",
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Status ID",
|
||||
example: "9umDrYheeY451cQnEe",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -47,7 +47,7 @@ def vote_operation do
|
|||
end
|
||||
|
||||
defp id_param do
|
||||
Operation.parameter(:id, :path, FlakeID, "Poll ID",
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Poll ID",
|
||||
example: "123",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -88,7 +88,7 @@ def delete_operation do
|
|||
end
|
||||
|
||||
defp id_param do
|
||||
Operation.parameter(:id, :path, FlakeID, "Poll ID",
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Poll ID",
|
||||
example: "123",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -70,7 +70,7 @@ def search_operation do
|
|||
Operation.parameter(
|
||||
:account_id,
|
||||
:query,
|
||||
FlakeID,
|
||||
FlakeID.schema(),
|
||||
"If provided, statuses returned will be authored only by this account"
|
||||
),
|
||||
Operation.parameter(
|
||||
|
@ -116,7 +116,7 @@ def search2_operation do
|
|||
Operation.parameter(
|
||||
:account_id,
|
||||
:query,
|
||||
FlakeID,
|
||||
FlakeID.schema(),
|
||||
"If provided, statuses returned will be authored only by this account"
|
||||
),
|
||||
Operation.parameter(
|
||||
|
|
|
@ -39,7 +39,7 @@ def index_operation do
|
|||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Include reactions from muted acccounts."
|
||||
)
|
||||
],
|
||||
|
@ -82,7 +82,7 @@ def show_operation do
|
|||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"Include reactions from muted acccounts."
|
||||
)
|
||||
],
|
||||
|
@ -685,7 +685,7 @@ def poll_params do
|
|||
end
|
||||
|
||||
def id_param do
|
||||
Operation.parameter(:id, :path, FlakeID, "Status ID",
|
||||
Operation.parameter(:id, :path, FlakeID.schema(), "Status ID",
|
||||
example: "9umDrYheeY451cQnEe",
|
||||
required: true
|
||||
)
|
||||
|
|
|
@ -176,7 +176,12 @@ defp instance_param do
|
|||
end
|
||||
|
||||
defp with_muted_param do
|
||||
Operation.parameter(:with_muted, :query, BooleanLike, "Include activities by muted users")
|
||||
Operation.parameter(
|
||||
:with_muted,
|
||||
:query,
|
||||
BooleanLike.schema(),
|
||||
"Include activities by muted users"
|
||||
)
|
||||
end
|
||||
|
||||
defp exclude_visibilities_param do
|
||||
|
|
|
@ -146,13 +146,13 @@ def update_notification_settings_operation do
|
|||
Operation.parameter(
|
||||
:block_from_strangers,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"blocks notifications from accounts you do not follow"
|
||||
),
|
||||
Operation.parameter(
|
||||
:hide_notification_contents,
|
||||
:query,
|
||||
BooleanLike,
|
||||
BooleanLike.schema(),
|
||||
"removes the contents of a message from the push notification"
|
||||
)
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue