I have a couple of endpoints that return instances of class A, but I wish to convert their output to another class B without modifying the methods.