Commit 287d44a
Merge #124
124: Standardize health method r=curquiza a=alallema
**Description**
Checking that method `health()` return `{'status': 'available'}` and added `is_healthy()` method who return boolean value
**Issue related**
meilisearch/integration-guides#55
**Some points of concern**
- I let `Health` struct like it was:
```rust
#[derive(Deserialize)]
pub struct Health {
pub status: String,
}
```
but I see we could write it this way too:
```rust
#[derive(Deserialize)]
#[serde(tag="status")]
pub enum Health {
#[serde(rename="available")]
Available
}
```
That's means API should return `'available'` and this could lead to more maintenance but it seemed to be more accurate.
Co-authored-by: alallema <[email protected]>
Co-authored-by: Amélie <[email protected]>1 file changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
196 | 217 | | |
197 | 218 | | |
198 | 219 | | |
| |||
0 commit comments