-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Provide a brief summary of the planned work
We should investigate whether Settable concept can be replaced with Java's optional (or a Kotlin-native alternative).
Detailed overview
Due to various migrations, Settable stayed in the codebase and is widely used for updating model data in network requests.
Example:
// Request to update User
{
company: null
}Is that a request to set the company property to null? Or is it a consequence of using a client JSON library that outputs undefined as null? It's unclear. To bring clarity to this problem, Settables were initially introduced and are now used in network requests, like this:
{
company: { value: null }
}So the first example is interpreted as "data not sent", while the second request is interpreted as "data sent, value is being set to null".
Looking at these examples, it's clear that this is similar to Java's Optional solution – which brings the question: can we replace this custom Settable solution with Java's native solution?
List the acceptance criteria
If feasible:
- Settable is replaced with Java's Optional everywhere in the services's business logic (Service & Repository layers)
- Network interface hasn't changed for the API consumers
- Tests are updated to reflect these changes, and passing
Include any additional notes (optional)
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status