Replies: 1 comment
-
FYI, couldn't figure this out with generic controllers so just went the poor man's route and fully generated new classes, e.g.
Which can then be used to generate controllers e.g.
Seems to work so far. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In trying to figure out how to implement a generic controller class that works for all my database models, dtos, inheritance & swagger docs I came across this enhancement: #1311
I also found this in the tests, which I've expanded a bit with a (I think) clearer working example:
I would appreciate some help on how to amend the above GenericController to allow returning a dto, e.g. the UserController's post method should return an instance of UserRead (not User, which would be my database model)?
Hope this is clear enough. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions