1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.Schemas.FilterUpdateRequest do
6 alias OpenApiSpex.Schema
10 title: "FilterUpdateRequest",
13 phrase: %Schema{type: :string, description: "The text to be filtered"},
16 items: %Schema{type: :string, enum: ["home", "notifications", "public", "thread"]},
18 "Array of enumerable strings `home`, `notifications`, `public`, `thread`. At least one context must be specified."
20 irreversible: %Schema{
23 "Should the server irreversibly drop matching entities from home and notifications?"
25 whole_word: %Schema{type: :bolean, description: "Consider word boundaries?", default: true}
26 # TODO: probably should implement filter expiration
27 # expires_in: %Schema{
29 # format: :"date-time",
31 # "ISO 8601 Datetime for when the filter expires. Otherwise,
32 # null for a filter that doesn't expire."
35 required: [:phrase, :context],
37 "phrase" => "knights",