I'm using TypeORM and want to make sure I am returning instances that then get serialized. But I am trying to follow: https://jsonapi.org/format/ which recommends adding a "type" property and putting the response under a "data" property.
I know that whatever gets returned at the end of a controller method is the HTTP Response body so I could write a wrapper function that does this, but is there a standardized way of doing this? I feel like doing my own version of it might cause problems with Swagger etc...