Skip to content

Commit 2926af7

Browse files
authored
Drop support for Typesense v0.25.2 (#14)
1 parent ca5c615 commit 2926af7

19 files changed

Lines changed: 100 additions & 90 deletions

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,29 @@ jobs:
2929
strategy:
3030
matrix:
3131
include:
32-
- typesense: '0.25.2'
32+
- typesense: '26.0'
3333
otp: '25'
3434
elixir: '1.14'
3535
lint: false
36-
- typesense: '26.0'
36+
- typesense: '27.0'
3737
otp: '25'
3838
elixir: '1.14'
3939
lint: false
4040
- typesense: '27.1'
4141
otp: '25'
4242
elixir: '1.14'
4343
lint: false
44-
- typesense: '0.25.2'
44+
- typesense: '26.0'
4545
otp: '27'
46-
elixir: '1.17'
46+
elixir: '1.18'
4747
lint: false
48-
- typesense: '26.0'
48+
- typesense: '27.0'
4949
otp: '27'
50-
elixir: '1.17'
50+
elixir: '1.18'
5151
lint: false
5252
- typesense: '27.1'
5353
otp: '27'
54-
elixir: '1.17'
54+
elixir: '1.18'
5555
lint: true
5656

5757
services:
@@ -73,8 +73,8 @@ jobs:
7373
-v /tmp/typesense-data:/data \
7474
-v /tmp/typesense-analytics-data:/analytics-data \
7575
typesense/typesense:${{ matrix.typesense}} \
76-
--api-key=xyz \
77-
--data-dir=/data \
76+
--api-key xyz \
77+
--data-dir /data \
7878
--enable-search-analytics=true \
7979
--analytics-dir=/analytics-data \
8080
--analytics-flush-interval=60 \

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## major.minor.patch (yyyy.mm.dd)
99

10+
## 0.6.0 (2025.01.19)
11+
12+
### Changed
13+
14+
* CI to support Typesense versions v26.0, v27.0, v27.1
15+
16+
### Removed
17+
18+
* Support for Typesense version v0.25.2
19+
1020
## 0.5.2 (2025.01.16)
1121

1222
### Changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Restful client for Typesense with adherence to Open API spec 3 (formerly Swagger
66
[![Hex.pm](https://img.shields.io/hexpm/v/open_api_typesense)](https://hex.pm/packages/open_api_typesense)
77
[![Hexdocs.pm](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/open_api_typesense)
88
[![Hex.pm](https://img.shields.io/hexpm/l/open_api_typesense)](https://hexdocs.pm/open_api_typesense/license.html)
9-
[![Typesense badge](https://img.shields.io/badge/Typesense-v27.1-darkblue)](https://typesense.org/docs/27.1/api)
9+
[![Typesense badge](https://img.shields.io/badge/Typesense-v26.0_%7C_v27.0_%7C_v27.1-darkblue)](https://typesense.org/docs/27.1/api)
1010
[![Coverage Status](https://coveralls.io/repos/github/jaeyson/open_api_typesense/badge.svg?branch=main)](https://coveralls.io/github/jaeyson/open_api_typesense?branch=main)
1111
[![CI Status](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jaeyson/open_api_typesense/actions/workflows/ci.yml)
1212

@@ -18,7 +18,7 @@ by adding `open_api_typesense` to your list of dependencies in `mix.exs`:
1818
```elixir
1919
def deps do
2020
[
21-
{:open_api_typesense, "~> 0.5"}
21+
{:open_api_typesense, "~> 0.6"}
2222

2323
# Or from GitHub repository, if you want the latest greatest from main branch
2424
{:open_api_typesense, git: "https://github.com/jaeyson/open_api_typesense.git"}

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule OpenApiTypesense.MixProject do
33

44
@source_url "https://github.com/jaeyson/open_api_typesense"
55
@hex_url "https://hexdocs.pm/open_api_typesense"
6-
@version "0.5.2"
6+
@version "0.6.0"
77

88
def project do
99
[

test/client_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ defmodule ClientTest do
7474
end)
7575
end
7676

77-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
77+
@tag ["27.1": true, "27.0": true, "26.0": true]
7878
test "returns the configured options" do
7979
Application.put_env(:open_api_typesense, :options,
8080
finch: MyApp.CustomFinch,
@@ -86,7 +86,7 @@ defmodule ClientTest do
8686
assert options === [finch: MyApp.CustomFinch, receive_timeout: 5_000]
8787
end
8888

89-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
89+
@tag ["27.1": true, "27.0": true, "26.0": true]
9090
test "returns an empty map if options is not configured" do
9191
Application.delete_env(:open_api_typesense, :options)
9292

@@ -95,7 +95,7 @@ defmodule ClientTest do
9595
assert options === nil
9696
end
9797

98-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
98+
@tag ["27.1": true, "27.0": true, "26.0": true]
9999
test "use another HTTP client" do
100100
map_conn = %{
101101
api_key: "xyz",

test/connection_test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule ConnectionTest do
44

55
alias OpenApiTypesense.Connection
66

7-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
7+
@tag ["27.1": true, "27.0": true, "26.0": true]
88
test "new/0 using the default config to creates a connection struct" do
99
assert Connection.new() === %Connection{
1010
api_key: "xyz",
@@ -14,7 +14,7 @@ defmodule ConnectionTest do
1414
}
1515
end
1616

17-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
17+
@tag ["27.1": true, "27.0": true, "26.0": true]
1818
test "new/1 with custom fields creates a connection struct" do
1919
conn =
2020
Connection.new(%{
@@ -32,20 +32,20 @@ defmodule ConnectionTest do
3232
}
3333
end
3434

35-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
35+
@tag ["27.1": true, "27.0": true, "26.0": true]
3636
test "new/1 with Connection struct" do
3737
conn = Connection.new()
3838
assert %Connection{} = Connection.new(conn)
3939
end
4040

41-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
41+
@tag ["27.1": true, "27.0": true, "26.0": true]
4242
test "new/1 with empty map raises ArgumentError" do
4343
error = assert_raise ArgumentError, fn -> Connection.new(%{}) end
4444

4545
assert error.message === "Missing required fields: [:api_key, :host, :port, :scheme]"
4646
end
4747

48-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
48+
@tag ["27.1": true, "27.0": true, "26.0": true]
4949
test "new/1 with invalid data type raises ArgumentError" do
5050
invalid_inputs = [
5151
nil,

test/operations/analytics_test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ defmodule AnalyticsTest do
7878
%{conn: conn, map_conn: map_conn}
7979
end
8080

81-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
81+
@tag ["27.1": true, "27.0": true, "26.0": true]
8282
test "error: create analytics rule with non-existent collection", %{
8383
conn: conn,
8484
map_conn: map_conn
@@ -114,7 +114,7 @@ defmodule AnalyticsTest do
114114
Analytics.create_analytics_rule(map_conn, body, [])
115115
end
116116

117-
@tag ["27.1": true, "26.0": true, "0.25.2": false]
117+
@tag ["27.1": true, "27.0": true, "26.0": true]
118118
test "success: upsert analytics rule", %{conn: conn, map_conn: map_conn} do
119119
name = "product_no_hits"
120120

@@ -151,7 +151,7 @@ defmodule AnalyticsTest do
151151
Analytics.upsert_analytics_rule(map_conn, name, body, [])
152152
end
153153

154-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
154+
@tag ["27.1": true, "27.0": true, "26.0": true]
155155
test "error: create analytics rule with wrong field" do
156156
name = "products_test_query"
157157
field_name = "wrong_field"
@@ -177,7 +177,7 @@ defmodule AnalyticsTest do
177177
assert {:error, %ApiResponse{message: _}} = Analytics.create_analytics_rule(body)
178178
end
179179

180-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
180+
@tag ["27.1": true, "27.0": true, "26.0": true]
181181
test "success: list analytics rules", %{conn: conn, map_conn: map_conn} do
182182
assert {:ok, %AnalyticsRulesRetrieveSchema{rules: rules}} =
183183
Analytics.retrieve_analytics_rules()
@@ -200,7 +200,7 @@ defmodule AnalyticsTest do
200200
Analytics.retrieve_analytics_rules(map_conn, [])
201201
end
202202

203-
@tag ["27.1": true, "26.0": false, "0.25.2": false]
203+
@tag ["27.1": true, "27.0": true, "26.0": false]
204204
test "success (v27.1): create analytics rule and event", %{conn: conn, map_conn: map_conn} do
205205
name = "product_popularity"
206206

test/operations/collections_test.exs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defmodule CollectionsTest do
3232
%{schema: schema, alias_name: "foo_bar", conn: conn, map_conn: map_conn}
3333
end
3434

35-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
35+
@tag ["27.1": true, "27.0": true, "26.0": true]
3636
test "success: clone a collection schema" do
3737
schema = %{
3838
"name" => "vehicles",
@@ -58,7 +58,7 @@ defmodule CollectionsTest do
5858
Collections.create_collection(payload, src_name: schema["name"])
5959
end
6060

61-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
61+
@tag ["27.1": true, "27.0": true, "26.0": true]
6262
test "success: create a collection", %{schema: schema, conn: conn, map_conn: map_conn} do
6363
name = schema["name"]
6464

@@ -72,7 +72,7 @@ defmodule CollectionsTest do
7272
Collections.create_collection(map_conn, schema, [])
7373
end
7474

75-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
75+
@tag ["27.1": true, "27.0": true, "26.0": true]
7676
test "success: list collections", %{conn: conn, map_conn: map_conn} do
7777
assert {:ok, collections} = Collections.get_collections()
7878
assert length(collections) >= 0
@@ -85,7 +85,7 @@ defmodule CollectionsTest do
8585
assert {:ok, _} = Collections.get_collections(map_conn, limit: 1)
8686
end
8787

88-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
88+
@tag ["27.1": true, "27.0": true, "26.0": true]
8989
test "success: update an existing collection", %{conn: conn, map_conn: map_conn} do
9090
name = "burgers"
9191

@@ -122,7 +122,7 @@ defmodule CollectionsTest do
122122
Collections.delete_collection(name)
123123
end
124124

125-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
125+
@tag ["27.1": true, "27.0": true, "26.0": true]
126126
test "success: list empty aliases", %{conn: conn, map_conn: map_conn} do
127127
assert {:ok, %CollectionAliasesResponse{aliases: aliases}} = Collections.get_aliases()
128128
assert length(aliases) >= 0
@@ -133,7 +133,7 @@ defmodule CollectionsTest do
133133
assert {:ok, _} = Collections.get_aliases(map_conn, [])
134134
end
135135

136-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
136+
@tag ["27.1": true, "27.0": true, "26.0": true]
137137
test "success: delete a missing collection", %{conn: conn, map_conn: map_conn} do
138138
assert Collections.delete_collection("non-existing-collection") ==
139139
{:error,
@@ -148,7 +148,7 @@ defmodule CollectionsTest do
148148
assert {:error, %ApiResponse{message: _}} = Collections.delete_collection(map_conn, "xyz", [])
149149
end
150150

151-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
151+
@tag ["27.1": true, "27.0": true, "26.0": true]
152152
test "success: upsert an alias", %{
153153
schema: schema,
154154
alias_name: alias_name,
@@ -176,7 +176,7 @@ defmodule CollectionsTest do
176176
assert {:error, %ApiResponse{message: _}} = Collections.delete_alias(map_conn, alias_name, [])
177177
end
178178

179-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
179+
@tag ["27.1": true, "27.0": true, "26.0": true]
180180
test "error: get a non-existing alias", %{conn: conn, map_conn: map_conn} do
181181
assert Collections.get_alias("non-existing-alias") ==
182182
{:error, %ApiResponse{message: "Not Found"}}
@@ -188,7 +188,7 @@ defmodule CollectionsTest do
188188
assert {:error, %ApiResponse{message: _}} = Collections.get_alias(map_conn, "xyz", [])
189189
end
190190

191-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
191+
@tag ["27.1": true, "27.0": true, "26.0": true]
192192
test "error: get a non-existing collection", %{conn: conn, map_conn: map_conn} do
193193
assert Collections.get_collection("non-existing-collection") ==
194194
{:error, %ApiResponse{message: "Not Found"}}

test/operations/conversations_test.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule ConversationsTest do
3434
%{conn: conn, map_conn: map_conn}
3535
end
3636

37-
@tag ["27.1": true, "26.0": true, "0.25.2": false]
37+
@tag ["27.1": true, "27.0": true, "26.0": true]
3838
test "success: list conversation models", %{conn: conn, map_conn: map_conn} do
3939
assert {:ok, models} = Conversations.retrieve_all_conversation_models()
4040
assert length(models) >= 0
@@ -45,7 +45,7 @@ defmodule ConversationsTest do
4545
assert {:ok, _} = Conversations.retrieve_all_conversation_models(map_conn, [])
4646
end
4747

48-
@tag ["27.1": true, "26.0": true, "0.25.2": false]
48+
@tag ["27.1": true, "27.0": true, "26.0": true]
4949
test "error: get a non-existent conversation model", %{conn: conn, map_conn: map_conn} do
5050
assert {:error, %ApiResponse{message: "Model not found"}} =
5151
Conversations.retrieve_conversation_model("non-existent")
@@ -57,7 +57,7 @@ defmodule ConversationsTest do
5757
assert {:error, _} = Conversations.retrieve_conversation_model(map_conn, "xyz", [])
5858
end
5959

60-
@tag ["27.1": true, "26.0": true, "0.25.2": false]
60+
@tag ["27.1": true, "27.0": true, "26.0": true]
6161
test "success: delete a conversation model", %{conn: conn, map_conn: map_conn} do
6262
assert {:error, %ApiResponse{message: "Model not found"}} =
6363
Conversations.delete_conversation_model("non-existent")
@@ -69,7 +69,7 @@ defmodule ConversationsTest do
6969
assert {:error, _} = Conversations.delete_conversation_model(map_conn, "xyz", [])
7070
end
7171

72-
@tag ["27.1": true, "26.0": true, "0.25.2": false]
72+
@tag ["27.1": true, "27.0": true, "26.0": true]
7373
test "error: create a conversation model with incorrect API key", %{
7474
conn: conn,
7575
map_conn: map_conn
@@ -102,7 +102,7 @@ defmodule ConversationsTest do
102102
assert {:error, _} = Conversations.create_conversation_model(map_conn, body, [])
103103
end
104104

105-
@tag ["27.1": true, "26.0": true, "0.25.2": false]
105+
@tag ["27.1": true, "27.0": true, "26.0": true]
106106
test "error: update a conversation model with incorrect API key", %{
107107
conn: conn,
108108
map_conn: map_conn

test/operations/curation_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule CurationTest do
3434
%{schema_name: name, conn: conn, map_conn: map_conn}
3535
end
3636

37-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
37+
@tag ["27.1": true, "27.0": true, "26.0": true]
3838
test "success: upsert search override", %{
3939
schema_name: schema_name,
4040
conn: conn,
@@ -69,7 +69,7 @@ defmodule CurationTest do
6969
Curation.upsert_search_override(map_conn, schema_name, override_id, body, [])
7070
end
7171

72-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
72+
@tag ["27.1": true, "27.0": true, "26.0": true]
7373
test "success: delete search override", %{
7474
schema_name: schema_name,
7575
conn: conn,
@@ -87,7 +87,7 @@ defmodule CurationTest do
8787
assert {:error, _} = Curation.delete_search_override(map_conn, schema_name, "test", [])
8888
end
8989

90-
@tag ["27.1": true, "26.0": true, "0.25.2": true]
90+
@tag ["27.1": true, "27.0": true, "26.0": true]
9191
test "success: list collection overrides", %{
9292
schema_name: schema_name,
9393
conn: conn,

0 commit comments

Comments
 (0)