-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
I’d like to emphasize that this solution does not allow the DTOs to grab information from other parts of the request than the request body (e.g. path components, query string or headers) in a very type safe manner. It is recommended to require requests to provide all information necessary to create the database item in the request body. That being said the DTOs still have access to the Request object, so no hard limitations there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice overall! Just some questions for my understanding left as comments.
Before we merge, i think it should be discussed if this solution provides enough flexibility and performance (uses Mirror multiple times currently). I am currently working on supporting Enums and Parent/Sibling relations. |
I think it's fine, performance isn't that big a priority, and it's flexible enough for what it needs to do. |
@jhoogstraat Can you merge develop into this, then I would approve and merge the PR. You can use your |
Changes are currently untested. Feedback welcome. |
We will archive Corvus in favor of Apodini as a worthy successor. |
Provide a way to define the layout of request bodies and how the data is processed.
Description
Adds two Modifiers (
SaveDTOModifier
andUpdateDTOModifier
) which require the programmer to define a struct conforming to eitherSaveDTO
orUpdateDTO
. These types are then decoded from the request body and used to save or update a model to the database.Ideas
Related Issue
Fixes 50% of #3
Types of changes
Checklist: