使用运行Spring Boot应用程序时
org.springdoc:springdoc-openapi-webflux-ui:1.7.0
当使用嵌套的复杂类型作为属性时,生成的模式表示单独的类型以及整个类,例如:
@RestController
class Controller {
@GetMapping
fun getA(): A {
return A(A.B(name = "Tom"))
}
}
data class A(val b: B) {
data class B(val name: String)
}
将导致在OpenAPI定义中生成:
我想知道在Spring Boot中,是否有任何方法可以在配置级别通过属性文件或特定的bean注册来限制它只生成高级模式?