Comment 2 for bug 1997258

Revision history for this message
Mike Rylander (mrylander) wrote :

Just jotting a couple thoughts down while it's fresh...

The transformation described would be easy on the way out of a method call, but hard on the way in because we haven't made consistent use of OpenSRF's parameter typing infrastructure. However, we can tell the system about the registered object type of each parameter (though there is some complication here with array and hash params containing FM objects), so it should be possible to do this over time as specific methods are needed for integration.

The code changes needed to transform Fieldmapper objects to bare hashes (and vice versa) exists in the prototype OpenAPI translator right now, and should really be moved into Evergreen's Fieldmapper package.

https://github.com/EquinoxOpenLibraryInitiative/eg-restful-api-experiment/blob/main/eg-api.pl#L1366