Skip to content

Commit 4fc32af

Browse files
authored
Cleanup, rename derive macro to Typesense (#36)
* Update test * Remove extra code * Example * Rename derive macro * Feature tokio_test * Fix openapi * Fix documents api import_documents
1 parent 22f7bb2 commit 4fc32af

38 files changed

+464
-1160
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
{ os: "ubuntu", target: "wasm32-unknown-unknown" },
1919
]
2020
env:
21+
# used to connect to httpmock
2122
URL: "http://localhost:5000"
2223
API_KEY: "VerySecretKey"
2324
steps:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# typesense-rust
1+
# Typesense (rust library)
22

33
[![Crate](https://img.shields.io/crates/v/typesense.svg)](https://crates.io/crates/typesense)
44
[![API](https://docs.rs/typesense/badge.svg)](https://docs.rs/typesense)
55

6-
Rust client for Typesense | Work In Progress & Help Wanted!
6+
Rust client library for Typesense | Work In Progress & Help Wanted!
77

8-
Codegen was generated with:
8+
OpenAPI codegen folder was generated with:
99

1010
```
1111
docker run --rm \

mocks/create_collection.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ then:
1919
{"name": "num_employees", "type": "int32" },
2020
{"name": "country", "type": "string", "facet": true }
2121
],
22-
"default_sorting_field": "num_employees"
22+
"default_sorting_field": "num_employees",
23+
"created_at": 1
2324
}'

mocks/drop_collection.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ then:
1818
{"name": "num_employees", "type": "int32" },
1919
{"name": "country", "type": "string", "facet": true }
2020
],
21-
"default_sorting_field": "num_employees"
21+
"default_sorting_field": "num_employees",
22+
"created_at": 1
2223
}'

mocks/get.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

mocks/get_api_key_header.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

mocks/import_documents.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
when:
2+
method: POST
3+
path: /collections/companies/documents/import
4+
header:
5+
- name: X-TYPESENSE-API-KEY
6+
value: VerySecretKey
7+
body: "{\"company_name\": \"test\", \"num_employees\": 1, \"country\": \"c1\"}\n{\"company_name\": \"test2\", \"num_employees\": 2, \"country\": \"c2\"}"
8+
then:
9+
status: 200
10+
header:
11+
- name: content-type
12+
value: application/text
13+
body: "{\"success\":true}\n{\"success\":true}"

mocks/post.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

mocks/post_api_key.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

mocks/retrieve_all_collections.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ then:
1919
{"name": "country", "type": "string", "facet": true}
2020
],
2121
"default_sorting_field": "num_employees",
22-
"created_at": 0
22+
"created_at": 1
2323
},
2424
{
2525
"num_documents": 1250,
@@ -30,5 +30,5 @@ then:
3030
{"name": "from_year", "type": "int32"}
3131
],
3232
"default_sorting_field": "num_employees",
33-
"created_at": 0
33+
"created_at": 1
3434
}]'

0 commit comments

Comments
 (0)