ShiinaKin
03/30/2026, 2:07 PMCommonResponse<T>
and a common page vo: PageResult<V>
so I declare it like this in .describe{ response { HTTP...OK { $here } } } :
schema = jsonSchema<CommonResponse<PageResult<ImagePageVO>>>()
but, when i see the openapi.json, all response of PageResult<V> with different generic class have the same schema inside
i'm just a junior programmer, just a little bit thought myself, it the step in picture lost the class info inside?
or did i do something wrong? happy to be replied!Bruce Hamilton
03/30/2026, 2:16 PMShiinaKin
03/30/2026, 2:27 PMBruce Hamilton
03/30/2026, 3:13 PMPageResult and using the first element type?Bruce Hamilton
03/30/2026, 3:47 PMBruce Hamilton
03/30/2026, 3:48 PMinline fun <reified E: Any> Parameter.Builder.commonResponseSchema(): JsonSchema = JsonSchema(
properties = mapOf(
"data" to ReferenceOr.value(
jsonSchema<E>()
)
),
required = listOf("data")
)ShiinaKin
03/31/2026, 12:15 AMShiinaKin
03/31/2026, 1:08 AM