Hi Isomorphic,
I'm currently developing my REST API. Besides the API functions itself which I whitelist on a per-operationBinding basis (see here), I need a way to show which functions the API actually offers.
My approach is this:
The question is now how to get the information needed - Do you suggest using your DataSource-APIs or a XPath approach?
If yours, could you add DataSource.getOperationBindings() and DataSource.getOperationBinding() which I can see in Eclipse to the list of allowed methods and doc it? I'm pretty sure they are safe to use anyway and perhaps also internally use a XPath (?).
Also, is the approach with the .ds.xml-directory file listing as 1st step the suggested one/best practice?
Thank you & Best regards
Blama
I'm currently developing my REST API. Besides the API functions itself which I whitelist on a per-operationBinding basis (see here), I need a way to show which functions the API actually offers.
My approach is this:
- For every .ds.xml-file: DataSourceManager.get()
- For every operationBinding check for apiAllowed="true" (my own attribute)
- If so, output DataSource with all fields (with name, type, length, required) and all API-allowed operationBindings
- For every operationBinding check for apiAllowed="true" (my own attribute)
The question is now how to get the information needed - Do you suggest using your DataSource-APIs or a XPath approach?
If yours, could you add DataSource.getOperationBindings() and DataSource.getOperationBinding() which I can see in Eclipse to the list of allowed methods and doc it? I'm pretty sure they are safe to use anyway and perhaps also internally use a XPath (?).
Also, is the approach with the .ds.xml-directory file listing as 1st step the suggested one/best practice?
Thank you & Best regards
Blama
Comment