When a user is uploading book he must enter an author of the book. To do as minimum duplicates as possible in a database, there is an API which will generate authors list and a user must ability to select from the existing authors. So this URL must be used when a user enters to 'author' input field (this call checks if the substring is present in any author name in the database, and return the list of authors):
<host>/api/v1/generate-authors/
When a user is uploading book he must enter an author of the book. To do as minimum duplicates as possible in a database, there is an API which will generate authors list and a user must ability to select from the existing authors. So this URL must be used when a user enters to 'author' input field (this call checks if the substring is present in any author name in the database, and return the list of authors):
<host>/api/v1/generate-authors/
Request as follows:
Error response (user token not exists):
A successful response will be like this output:
If no authors was generated, the data param will be an empty list (array)