Resolve circular reference for both 'application/json' and 'application/xml'.