Open aleene opened 2 years ago
What do you mean?
https://api.folksonomy.openfoodfacts.org/docs#/default/hello__get provides only one answer.
@CharlesNepote it's more than the documentation is not accurate. The part you above is because the real answer. While the schema at the bottom specify we should receive a simple string, while indeed we receive a dict with a "message" key containing the message.
Ok. So the title of this issue is wrong. We don't get 2 "200" answers: you can verify with curl -v -X 'GET' 'https://api.folksonomy.openfoodfacts.org/' -H 'accept: application/json'
.
The second "200" shown on your screenshot is what the API should reply.
So there is indeed an issue, but the right title should be "The server response is different from the one expected". I'm changing the title.
The issue occurs with:
I guess we need to create more classes in https://github.com/openfoodfacts/folksonomy_api/blob/main/folksonomy/models.py and add them to the routes as in
@app.get("/products/stats", response_model=List[ProductStats])
What
The Swagger documentation specifies 2 200 responses for the Hello API. Which one is the correct one?
Steps to reproduce the behavior:
Look at the Swagger doc
Expected behaviour
Just the json response seems enough.
Part of
70