fix: Update BusinessToolController to use generateSchema

This commit is contained in:
jade
2026-07-20 17:15:49 +09:00
parent b55f863de9
commit 515ab409ec

View File

@@ -148,8 +148,8 @@ public class BusinessToolController {
Class<?> paramType = targetMethod.getParameterTypes()[0]; Class<?> paramType = targetMethod.getParameterTypes()[0];
if (!Map.class.isAssignableFrom(paramType)) { if (!Map.class.isAssignableFrom(paramType)) {
try { try {
Map<String, Object> autoSchema = JsonSchemaGenerator.generatePropertiesSchema(paramType); Map<String, Object> autoSchema = JsonSchemaGenerator.generateSchema(paramType);
String fullSchemaJson = "{\"type\":\"object\", \"properties\":" + objectMapper.writeValueAsString(autoSchema) + "}"; String fullSchemaJson = objectMapper.writeValueAsString(autoSchema);
JsonSchemaFactory factory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7); JsonSchemaFactory factory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7);
JsonSchema schema = factory.getSchema(fullSchemaJson); JsonSchema schema = factory.getSchema(fullSchemaJson);