am wondering why does the SearchHandler not depend on a Resource ?
Currently the SearchHandler.getSearchConfig returns the SearchConfig which contains the supportedResource which is simply a String.
So the same String for ex. “v1/obs” that has been declared on the Resource in the annotation is repeated again in the declaration of the SearchConfig.
So there is a dependency of SearchHandler to Resource just not in the code. If you write a SearchHandler for a Resource that doesn’t exist obviously that won’t work but you will only notice at runtime.
Am wondering why that is and If it should be changed?
Let’s get type safety