Questions tagged [okapi]
4 questions
1
vote
0 answers
How to show headers in swagger UI using `rocket_okaapi`
I currently have a Login struct (email, password) and an associated request guard that checks if the needed email and password headers are in the request. If so the struct is built and passed to the route if not a 401, Bad Request is returned.
MY…

Dilec Padovani
- 149
- 1
- 8
1
vote
1 answer
I have a question about BM25's IDF method
I was looking up about the BM25 algorithm and I have an image related question about how IDF is calculated.
I saw the image below is the IDF difference between BM25 and TF-IDF.
The IDF formula for TF-IDF and the IDF formula for BM25 are shown…

SAXYCOW
- 11
- 3
1
vote
1 answer
Writing CDATA section with Okapi XLIFF 2.0 lib
I am using okapi-lib-xliff2:1.44.0 to create an .xlf file. I want to add CDATA sections to some of the elements. According to XLIFF 2.0 documentation it is…

mahsa
- 31
- 3
0
votes
1 answer
How to return a Result type using rocket_okapi in Rust?
I am trying to create a web app that uses rocket_okapi to generate an openapi spec. I have defined some routes, but I cannot apply the openapi macro to them. Below is an example:
#[openapi]
#[get("/reading_lists")]
pub fn get_all_lists() ->…

Omar Imtiaz
- 3
- 2