spierce7
05/10/2023, 3:02 PMAndrew O'Hara
05/10/2023, 7:00 PMspierce7
05/11/2023, 2:37 PMAndrew O'Hara
05/11/2023, 2:54 PMRyan Brink
05/11/2023, 2:56 PMChrimaeon
05/12/2023, 2:48 PMspierce7
05/12/2023, 2:49 PMRyan Brink
05/12/2023, 3:00 PMChrimaeon
05/12/2023, 3:05 PM3.0.0
but its not officialy supported https://github.com/swagger-api/swagger-ui#compatibilityRyan Brink
05/12/2023, 3:06 PMChrimaeon
05/12/2023, 3:07 PMRyan Brink
05/12/2023, 3:08 PMChrimaeon
05/12/2023, 3:11 PMRyan Brink
05/12/2023, 3:14 PMRyan Brink
05/12/2023, 4:44 PMRyan Brink
05/12/2023, 4:45 PMChrimaeon
05/12/2023, 4:48 PMprivate fun Route.documentation() {
install(NotarizedRoute()) {
tags = setOf("Profile")
get = GetInfo.builder {
summary("Profile")
description("Fetch the profile information")
response {
responseCode(HttpStatusCode.OK)
responseType<Profile>()
description("The profile object")
}
}
}
}
Chrimaeon
05/12/2023, 4:49 PMChrimaeon
05/12/2023, 4:50 PMRyan Brink
05/12/2023, 4:53 PMis there a way to omit the empty verbs?this is up to your serializer, not kompendium. for example if you are using kotlinx serialization, you would want to configure the content negotiation to use a Json encoder that does not use explicit nulls
Json {
encodeDefaults = true
explicitNulls = false
serializersModule = KompendiumSerializersModule.module
}
more feedback: the “builder” dsl is a little verboce in not telling which parameters are manadatory.yes, I feel the same way. I believe there was a reason I chose this option over the constructor approach, but I can't recall off the top of my head
Ryan Brink
05/12/2023, 4:53 PMChrimaeon
05/12/2023, 4:55 PMput
, post
..Ryan Brink
05/12/2023, 4:56 PMput: null
... as to why that shows in the editor as a valid route, i do not knowRyan Brink
05/12/2023, 4:56 PMChrimaeon
05/12/2023, 4:58 PMyou would want to configure the content negotiation to use a Json encoder that does not use explicit nullsNo, I dont want to change my serializer for the whole backend. is there a way to set the serializer in the
NotarizedXXX
???Ryan Brink
05/12/2023, 5:00 PMRyan Brink
05/12/2023, 5:00 PMChrimaeon
05/12/2023, 5:00 PMbut the openapi spec is correct as far as I can telLthe json validator complains as well
Ryan Brink
05/12/2023, 5:01 PMChrimaeon
05/12/2023, 5:03 PMRyan Brink
05/12/2023, 5:03 PMChrimaeon
05/12/2023, 5:04 PMout of curiosity... what did you have trouble w/ when using kompendium? I am the creator 🙂 happy to answer any Qs if you have themif you write a library you should be open to feedback and how other use it. 😉
Ryan Brink
05/12/2023, 5:05 PMChrimaeon
05/12/2023, 5:06 PMChrimaeon
05/12/2023, 5:07 PMRyan Brink
05/12/2023, 5:08 PMChrimaeon
05/12/2023, 5:09 PM