jamesnetherton opened a new pull request, #29693:
URL: https://github.com/apache/camel/pull/29693
## Description
Upgrades `com.networknt:json-schema-validator` to 3.0.9, which is built on
Jackson 3 (`tools.jackson`), and moves the
modules that use it to Jackson 3.
The two tickets ship together: `mcp-json-jackson2` needs
json-schema-validator 2, and an application can only have one
version of it. With json-schema-validator 3, `mcp-json-jackson2` fails with
a `NoSuchMethodError` as soon as it checks
the schema of a tool.
### CAMEL-23172: json-schema-validator 3
- **camel-json-validator**
- The `objectMapper` option of the endpoint is now a
`tools.jackson.databind.ObjectMapper`. The component's
`objectMapper` and `useDefaultObjectMapper` options only find a mapper
of that type in the registry.
- A mapper id given to the component that does not resolve now fails with
a `NoSuchBeanException`; it was ignored
before.
- Without a mapper of your own, the body is read with the Jackson 2
defaults, so the same bodies pass or fail as
before.
- `enabledDeserializationFeatures` / `disabledDeserializationFeatures`
configure a copy of the mapper (a Jackson 3
mapper cannot be changed). Names are trimmed, and an unknown name fails
with a message naming the expected
feature type.
- **camel-yaml-dsl-validator**
- Moves to Jackson 3.
- The new `YamlTrees.newMapper()` reads YAML with the YAML 1.2 core schema
and octal numbers. Without it, Jackson 3
reads `~`, `Null`, `0x1F`, `0123` and `+12` as text instead of null and
numbers.
- **camel-jbang-core**
- `CitrusTestChecks` moves to Jackson 3. It still accepts the YAML 1.1
integers that Citrus (SnakeYAML) reads, such
as `1_000` and `0b101`.
- `SourceValidator` strips the `in reader,` marker that the Jackson 3 YAML
parser (snakeyaml-engine) writes.
### CAMEL-26469: mcp-json-jackson3
- `camel-mcp-server`, `camel-mcp-server-api` and the MCP client of
`camel-openai` use `mcp-json-jackson3` instead of
`mcp-json-jackson2`.
- `camel-mcp-server` no longer brings Jackson 2 databind to an application.
### Upgrade guide (4.24)
- **json-validator:** the mapper type; the stricter `objectMapper` lookup; a
Jackson 2 registry mapper that is no
longer used; Spring Boot's `JsonMapper` and the trailing-content
behaviour; feature names that Jackson 3 moved
(e.g. `READ_ENUMS_USING_TO_STRING`); validation changes in
json-schema-validator 3.0 (`date-time`, `time` formats);
the `DefaultJsonUriSchemaLoader` `mapper` field type.
- **MCP:** the dependency swap, and the Jackson 3 defaults of the MCP mapper
(alphabetical property order, ISO-8601
dates, stricter reading).
## Target
- [x] I checked that the commit is targeting the correct branch (Camel 4
uses the `main` branch)
## Tracking
- [x] If this is a large change, bug fix, or code improvement, I checked
there is a
[JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the
change (usually before you start working on it).
## Apache Camel coding standards and style
- [x] I checked that each commit in the pull request has a meaningful
subject line and body.
- [x] I have run `mvn clean install -DskipTests` locally from root folder
and I have committed all auto-generated changes.
---
_Claude Code on behalf of jamesnetherton_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]