Skip to content

Commit d47e908

Browse files
authored
Merge pull request #110 from schemacrawler/nextrel
Update Spring AI version
2 parents 7b1626b + d210fac commit d47e908

File tree

14 files changed

+52
-39
lines changed

14 files changed

+52
-39
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# ========================================================================
88

99
# Provided arguments
10-
ARG FROM_IMAGE=schemacrawler/schemacrawler:v16.28.2
10+
ARG FROM_IMAGE=schemacrawler/schemacrawler:v16.28.3
1111

1212
# BUILDER stage - Build SchemaCrawler AI
1313
FROM maven:3.9-eclipse-temurin-21 AS builder

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-ai-aggregator</artifactId>
9-
<version>16.28.2-2</version>
9+
<version>16.28.3-1</version>
1010
<packaging>pom</packaging>
1111
<name>SchemaCrawler AI [Aggregator]</name>
1212

schemacrawler-ai-aichat/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>us.fatehi</groupId>
66
<artifactId>schemacrawler-ai-parent</artifactId>
7-
<version>16.28.2-2</version>
7+
<version>16.28.3-1</version>
88
<relativePath>../schemacrawler-ai-parent</relativePath>
99
</parent>
1010
<artifactId>schemacrawler-ai-aichat</artifactId>

schemacrawler-ai-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-ai-parent</artifactId>
9-
<version>16.28.2-2</version>
9+
<version>16.28.3-1</version>
1010
<relativePath>../schemacrawler-ai-parent</relativePath>
1111
</parent>
1212

schemacrawler-ai-core/src/main/java/schemacrawler/tools/ai/tools/FunctionParameters.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
package schemacrawler.tools.ai.tools;
1010

11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
1113
public interface FunctionParameters {
1214

15+
@JsonIgnore
1316
FunctionReturnType getFunctionReturnType();
1417
}

schemacrawler-ai-distrib/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-ai-parent</artifactId>
9-
<version>16.28.2-2</version>
9+
<version>16.28.3-1</version>
1010
<relativePath>../schemacrawler-ai-parent</relativePath>
1111
</parent>
1212

schemacrawler-ai-langchain4j/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-ai-parent</artifactId>
9-
<version>16.28.2-2</version>
9+
<version>16.28.3-1</version>
1010
<relativePath>../schemacrawler-ai-parent</relativePath>
1111
</parent>
1212

schemacrawler-ai-mcpserver/mcp-registration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"url": "https://github.com/schemacrawler/SchemaCrawler-AI",
99
"source": "github"
1010
},
11-
"version": "v16.28.2-2",
11+
"version": "v16.28.3-1",
1212
"packages": [
1313
{
1414
"registry_type": "oci",
1515
"registry_base_url": "https://docker.io",
1616
"identifier": "schemacrawler/schemacrawler-ai",
17-
"version": "v16.28.2-2",
17+
"version": "v16.28.3-1",
1818
"transport": {
1919
"type": "stdio"
2020
},

schemacrawler-ai-mcpserver/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>us.fatehi</groupId>
88
<artifactId>schemacrawler-ai-parent</artifactId>
9-
<version>16.28.2-2</version>
9+
<version>16.28.3-1</version>
1010
<relativePath>../schemacrawler-ai-parent</relativePath>
1111
</parent>
1212
<artifactId>schemacrawler-ai-mcpserver</artifactId>
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>org.springframework.ai</groupId>
4747
<artifactId>spring-ai-bom</artifactId>
48-
<version>1.1.0-M1</version>
48+
<version>1.1.0-M2</version>
4949
<type>pom</type>
5050
<scope>import</scope>
5151
</dependency>
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import schemacrawler.tools.ai.model.TableDocument;
2727

2828
@Service
29-
public class DatabaseObjectResourceProvider {
29+
public class ResourceProvider {
3030

3131
@Autowired public Catalog catalog;
3232

@@ -47,11 +47,11 @@ public String getRoutineDetails(
4747
.withAdditionalRoutineDetails(allRoutineDetails())
4848
.getRoutineDocument(routine);
4949
LoggingUtility.log(
50-
exchange, String.format("Generated resource for <%s>", resourceRequest.uri()));
50+
exchange, String.format("Located resource for <%s>", resourceRequest.uri()));
5151
return document.toObjectNode().toPrettyString();
5252
} catch (final Exception e) {
5353
LoggingUtility.logException(
54-
exchange, String.format("Could not read resource <%s>", resourceRequest.uri()), e);
54+
exchange, String.format("Could not locate resource <%s>", resourceRequest.uri()), e);
5555
throw e;
5656
}
5757
}
@@ -73,36 +73,36 @@ public String getTableDetails(
7373
.withAdditionalTableDetails(allTableDetails())
7474
.getTableDocument(table);
7575
LoggingUtility.log(
76-
exchange, String.format("Generated resource for <%s>", resourceRequest.uri()));
76+
exchange, String.format("Located resource for <%s>", resourceRequest.uri()));
7777
return document.toObjectNode().toPrettyString();
7878
} catch (final Exception e) {
7979
LoggingUtility.logException(
80-
exchange, String.format("Could not read resource <%s>", resourceRequest.uri()), e);
80+
exchange, String.format("Could not locate resource <%s>", resourceRequest.uri()), e);
8181
throw e;
8282
}
8383
}
8484

8585
private <DO extends DatabaseObject> DO lookupDatabaseObject(
86-
final String databaseObjectName, final Collection<DO> databaseObjects) {
87-
requireNonNull(databaseObjects, "No database objects provided");
86+
final String databaseObjectName, final Collection<DO> allDatabaseObjects) {
87+
requireNonNull(allDatabaseObjects, "No database objects provided");
8888
final String searchObjectName = trimToEmpty(databaseObjectName);
89-
final List<DO> routines =
90-
databaseObjects.stream()
89+
final List<DO> databaseObjects =
90+
allDatabaseObjects.stream()
9191
.filter(
9292
databaseObject ->
9393
databaseObject.getName().equalsIgnoreCase(searchObjectName)
9494
|| databaseObject.getFullName().equalsIgnoreCase(searchObjectName))
9595
.collect(Collectors.toList());
96-
if (routines.isEmpty()) {
96+
if (databaseObjects.isEmpty()) {
9797
throw new SchemaCrawlerException(String.format("<%s> not found", databaseObjectName));
9898
}
99-
if (routines.size() > 1) {
99+
if (databaseObjects.size() > 1) {
100100
throw new SchemaCrawlerException(
101101
String.format(
102102
"<%s> has too many matches - provide a fully-qualified name", databaseObjectName));
103103
}
104104

105-
final DO routine = routines.get(0);
106-
return routine;
105+
final DO databaseObject = databaseObjects.get(0);
106+
return databaseObject;
107107
}
108108
}

0 commit comments

Comments
 (0)