Standardizing the inputs for search filters #26
gargmishu
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
@gargmishu Thanks for the suggestion. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm exploring Diksha APIs on sandbox https://dev.diksha.gov.in/#/discoverapi and noticed that lot of filters are free text string.
The filters for content search API (/content/v1/search) takes free text as input, which is subject to typos. API users might give invalid input inadvertently and end up with no results. There is no way to know if result set is actually empty or due to invalid inputs. This can be prevented by standardizing inputs
ex: se_grades could take only numerical inputs from class 1-10 and throw error if someone specifies any other value
se_subject, se_medium, primaryCategory - could take predefined values (similar to enums in java) and throw error if any other input is specified.
Happy to engage in discussion and discuss more about the idea
Beta Was this translation helpful? Give feedback.
All reactions