Skip to content

Commit

Permalink
Remove does_not_contain support (plausible#4564)
Browse files Browse the repository at this point in the history
It only needed to be live until users have reload. This has been live
for >24h.
  • Loading branch information
macobo authored Sep 10, 2024
1 parent 2180ab4 commit e8d544c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
2 changes: 0 additions & 2 deletions lib/plausible/stats/filters/query_parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ defmodule Plausible.Stats.Filters.QueryParser do
defp parse_operator(["matches_wildcard_not" | _rest]), do: {:ok, :matches_wildcard_not}
defp parse_operator(["contains" | _rest]), do: {:ok, :contains}
defp parse_operator(["contains_not" | _rest]), do: {:ok, :contains_not}
# :TODO: Remove this once frontend support is gone
defp parse_operator(["does_not_contain" | _rest]), do: {:ok, :contains_not}
defp parse_operator(["not" | _rest]), do: {:ok, :not}
defp parse_operator(["and" | _rest]), do: {:ok, :and}
defp parse_operator(["or" | _rest]), do: {:ok, :or}
Expand Down
4 changes: 2 additions & 2 deletions lib/plausible/stats/json_schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ defmodule Plausible.Stats.JSONSchema do
@internal_query_schema @raw_public_schema
# Add overrides for things allowed in the internal API
|> JSONPointer.add!(
"#/definitions/filter_entry/oneOf/0/items/0/oneOf/0/enum/0",
"#/definitions/filter_entry/oneOf/0/items/0/enum/0",
"matches_wildcard"
)
|> JSONPointer.add!(
"#/definitions/filter_entry/oneOf/0/items/0/oneOf/0/enum/0",
"#/definitions/filter_entry/oneOf/0/items/0/enum/0",
"matches_wildcard_not"
)
|> JSONPointer.add!("#/definitions/metric/oneOf/0", %{
Expand Down
21 changes: 6 additions & 15 deletions priv/json-schemas/query-api-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,12 @@
"type": "array",
"items": [
{
"oneOf": [
{
"type": "string",
"enum": [
"is_not",
"contains_not",
"matches",
"matches_not"
]
},
{
"const": "does_not_contain",
"deprecationMessage": "Legacy support, will be removed next week",
"deprecated": true
}
"type": "string",
"enum": [
"is_not",
"contains_not",
"matches",
"matches_not"
],
"description": "filter operation"
},
Expand Down

0 comments on commit e8d544c

Please sign in to comment.