<commit_before>defmodule Annon.Configuration.Schemas.Plugin do
  @moduledoc """
  Schema for Plugins settings.
  """
  use Ecto.Schema
  import Ecto.Changeset
  import Annon.Validators.Settings
  alias Annon.Configuration.Schemas.Plugin, as: PluginSchema
  alias Annon.Configuration.Schemas.API, as: APISchema

  @type t :: %PluginSchema{
    name: atom,
    is_enabled: boolean,
    settings: map
  }

  @valid_plugin_names [
    "jwt", "validator", "acl", "proxy", "idempotency", "ip_restriction", "ua_restriction", "scopes", "cors"
  ]

  @derive {Poison.Encoder, except: [:__meta__, :api]}
  schema "plugins" do
    field :name, :string
    field :is_enabled, :boolean, default: false
    field :settings, :map

    belongs_to :api, APISchema, type: :binary_id

    timestamps()
  end

end<commit_msg>Drop unused attributes<commit_after>defmodule Annon.Configuration.Schemas.Plugin do
  @moduledoc """
  Schema for Plugins settings.
  """
  use Ecto.Schema
  alias Annon.Configuration.Schemas.API, as: APISchema

  @derive {Poison.Encoder, except: [:__meta__, :api]}
  schema "plugins" do
    field :name, :string
    field :is_enabled, :boolean, default: false
    field :settings, :map

    belongs_to :api, APISchema, type: :binary_id

    timestamps()
  end
end
{'fraction_non_alphanumeric': 0.1182033096926714, 'fraction_numerical': 0.0, 'mean_word_length': 4.019762845849803, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4730627', 'n_tokens_mistral': 438, 'n_tokens_neox': 432, 'n_words': 110}