Open petomalina opened 6 years ago
It would be awesome if the API client could generate constructor functions which would automatically fill null fields.
E.g:
interface User { name: string; email: string; }
and the response from the API would be:
{ "email": "foo@bar.baz" }
the client would automatically migrate this model into:
{ "name": "", "email": "foo@bar.baz" }
in user.model.ts file there would be a function getUser which will take User as an optional parameter. It will return an empty user merged with the user provided in params
user.model.ts
getUser
User
It would be awesome if the API client could generate constructor functions which would automatically fill null fields.
E.g:
and the response from the API would be:
the client would automatically migrate this model into: