-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API file-upload schema for meta
#3790
Comments
Hello! @TuanaCelik. I am new to Heystack and want to work on this issue. Could you please guide me further? |
Hey @manulpatel - great to hear! We have our contributing guidelines here The issue I think originates from here |
Thanks a lot! @TuanaCelik. I am following the guidelines and hoping for a succcessful PR. |
Currently the
meta
field for thefile-upload
endpoint expects a string. Which inrest_api/controller/file_upload.py
is then loaded as json:meta_form = json.loads(meta) or {}
So if you want to upload a file with
meta
you have to provide meta as follows (in Python for example):Whereas for getting documents by filters the schema is slightly different but also a bit more intuitive imo. Filters are also a dict, but the schema is set as such we can do the following for the request:
Suggestion: Change the schema to expect a dict for the meta field too. That way via the API reference users only have to worry about providing keys and values. And in code they provide an object rather than an object wrapped up as a string.
The text was updated successfully, but these errors were encountered: