Closed devketanpro closed 3 months ago
Do we have a clear definition of what exactly is a "custom" vocabulary? I'd rather expose a method to get all vocabularies from here
yep, custom vocabularies means which vocab we can add via metadata settings.
In the backend we fetch this type of vocab by query :- "field_type": None, "service": {"$exists": True}
Since I was looking at vocabulary code I also pushed some improvements.
Regarding your code, one improvement I made is to keep API slimmer is to only expose isCustomVocabulary
method. I also exposed a method to get all vocabularies so you can later filter them using isCustomVocabulary
.
Let me know if you have other improvements in mind.
Add new
getCustomVacabulary
func in superdesk-api which we used in supedesk-analytics. https://github.com/superdesk/superdesk-analytics/pull/151