unnsse
01/16/2020, 8:13 PMMartins Joseph
01/17/2020, 10:15 PMFelistas Ngumi
02/04/2020, 10:41 AMdependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "ch.qos.logback:logback-classic:$logback_version"
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
}
Timur Atakishiev
02/04/2020, 3:25 PMDTO
data class CompanyCreateDto(
val name: String,
val address: String
)
The dto is send by front end for me. Problem is when the name is null kotlin throws an exception that can not be handled. Is it any library or any approach, that provide an ability to give a custom exception with text like name can not be null
for exampleTim Schraepen
02/05/2020, 9:44 PMTim Schraepen
02/06/2020, 6:02 AMJames Richardson
02/06/2020, 7:38 AMBrindasanth
02/07/2020, 11:38 PMBruno_
02/10/2020, 9:16 AMHarart
02/10/2020, 1:48 PMasad.awadia
02/11/2020, 1:12 AMnicholasnet
02/15/2020, 6:56 PMDesmond Xu
02/18/2020, 9:15 AMHarun Artın
02/21/2020, 8:43 PMearroyoron
02/24/2020, 6:34 AMFile.readLines
is discouraged for big files.
I suppose is just because it builds a List
so of course a Sequence
is preferred.
But, does this advice apply also to:
val stream: Flow<String> = File(arguments.filename).readLines().asFlow()
?
Not sure if the composer maybe optimise this to not have the full list before flowing,...Amardeep
02/24/2020, 8:11 PMDavid Gethers
03/02/2020, 3:38 PMMicronaut
? I need a bit of help writing tests for Controllers. Examples: How do you write a test to ensure a redirect happens? How do you mock header information?rrva
03/05/2020, 10:07 AMSlackbot
03/06/2020, 9:25 PMMax
03/08/2020, 1:13 AMChills
03/17/2020, 8:29 AMCosmin Victor Celea
03/20/2020, 8:42 AMVictor
03/22/2020, 4:44 PMmaxmello
04/11/2020, 3:18 PMvar
. But when a model is stored in a database and edited in a frontend, we (de-)serialize the model, which removes the usefulness of val
, because objects are newly created when deserialized (e.g. from a JSON request body). In my PUT
endpoints, I want to make sure only the fields are updated which are actually mutable, so right now I manually get the old version of the model from the database and update mutable fields one by one manually from the new instance. For me, this has 2 problems: If I only update the var fields, the client might wonder why the other fields did not update on the next request. Secondly, when the model changes, it is easy to forget updating the manual updating code.
Anybody got a better approach to this? Do you prever PUT endpoints per mutable property instead?Gregor Zeitlinger
04/20/2020, 7:10 AMTaha
04/20/2020, 12:49 PMPypdeveloper
04/26/2020, 2:40 PMGeoffrey De Smet
04/27/2020, 5:21 PMmuliyul
04/28/2020, 8:20 AM{
"errors": [
"updateAddress.arg1.county must not be empty"
]
}
v79
04/28/2020, 7:49 PM