thomascube opened a new issue, #7077:
URL: https://github.com/apache/camel-quarkus/issues/7077

   ### Bug description
   
   We're using the JSON Schema validator in a Quarkus application which is 
distributed as native binary.
   While the JVM version generates proper and human-readable validation error 
messages, the messages differ and become rather cryptic when running the app as 
native binary.
   
   This is how we validate a json string against a schema:
   
   ```java
   final JsonNode node = objectMapper.readTree(jsonString);
   final Set<ValidationMessage> errors = schema.validate(node);
   if (!errors.isEmpty()) {
     // print out 
errors.stream().map(ValidationMessage::getMessage).collect(Collectors.joining(";
 ")
   }
   ```
   
   Here's how this looks like when running the jar:
   ```
   $.pipelines[0].customParameters[0]: required property 'values' not found; 
$.pipelines[0].customParameters[0]: property 'value' is not defined in the 
schema and the schema does not allow additional properties 
   ```
   
   The same json validation error prints like this in the native binary:
   ```
   required; additionalProperties 
   ```
   
   I assume this is related to reflection and missing classes being registered 
for reflection. However, I wasn't able to figure out which classes I have to 
register for reflection. Please help.


-- 
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: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to