jizt-it / jizt-backend-microservice

AI Text Summarization in the cloud (microservice, event-driven version). Not currently maintained.
https://www.jizt.it
GNU General Public License v3.0
3 stars 0 forks source link

[Bug] Endpoint "v1/summaries/plain-text" fails with POST and summary ID in URL #9

Closed dmlls closed 3 years ago

dmlls commented 3 years ago

Describe the bug

  1. Submit a POST request with the source text included in the body.
  2. A summary ID will be returned.
  3. Submit a GET request with the summary ID in the URL.

However, if we change GET by POST in step 3, the API crashes:

TypeError: post() got an unexpected keyword argument 'summary_id'

To Reproduce

  1. Submit a POST request to e.g. the following URL: https://api.jizt.it/v1/summaries/plain-text/b181474570ea6a29c2851941e60edb3d26e4225fc80d9fa73acf7bb35c8792fc.

Expected behavior The server handles this situation nicely, for example by returning a 400 Bad Request.