You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It seems possible to create a completely empty setting (with blank name, blank category and empty value) in the POST /settings endpoint:
Thanks @pieroit for confirming that this is probably not expected. I'm not sure how this settings should be used. Is the name mandatory? What about category or the value?
IMO at least the name and the value should not be empty, but I don't know if also the category should be mandatory.
Thanks @pieroit for confirming that this is probably not expected. I'm not sure how this settings should be used. Is the name mandatory? What about category or the value?
They should be used freestyle, so we can impose a minimal validation without restricting freedom (as a framework sould do).
In the future we may add the possibility to add custom validators via hook, but too soon for that.
IMO at least the name and the value should not be empty, but I don't know if also the category should be mandatory.
let's make all of them non null/empty
Assigned ;)
I may add the tests for this if you don't feel like it, because they are long due (my bad).
BTW they should go here
Simple pydantic validation rules could be added in the crud model, wdyt?
pieroit
changed the title
[BUG] Missing validation on create /settings endpoint
[BUG] Missing validation on factory endpoints (LLM, embedder, auth)
Oct 21, 2024
Describe the bug
It seems possible to create a completely empty setting (with blank name, blank category and empty value) in the
POST /settings
endpoint:result:
Expected behavior
Maybe it's the expected behavior but I'm not sure if at least the name should be verified, or all the three fields.
The text was updated successfully, but these errors were encountered: