Closed Ziedelth closed 5 months ago
Hi, i switched to my own library for generating schemas for objects. It seems like the previous generator automatically encoded UUIDs as strings which is not a default behavior with the new one. You can configure this manually by customizing the schema generator and overwriting or redirecting UUIDs to strings
I tested it by simply "redirecting" and it produced the desired result:
install(SwaggerUI) {
schemas {
generator = { type ->
type
.collectSubTypes()
.processReflection {
redirect<UUID, String>() // redirect UUID to string, i.e treat is as a string for schema generation
}
.connectSubTypes()
.handleNameAnnotation()
.generateSwaggerSchema()
.handleCoreAnnotations()
.withAutoTitle(TitleType.SIMPLE)
.compileReferencingRoot()
}
}
}
Hi there,
I noticed a problem with the UUID display in Swagger between versions 2.10.0 and 3.0.0. Before, the display indicated that it was a UUID string, but now it indicates that it is an object.
Is this normal behavior?
Thanks for your help.
Version 2.10.0
Version 3.0.0