Croway opened a new pull request, #22827:
URL: https://github.com/apache/camel/pull/22827
## Summary
- **Cache `OpenApiInteractionValidator`** — avoid rebuilding the expensive
validator on every `validate()` call; cache is keyed by OpenAPI instance +
effective validation levels and invalidates automatically on config change
- **URL-decode query parameters** — use `URLDecoder.decode()` on query
keys/values and `split("=", 2)` to correctly handle encoded characters and
values containing `=`
- **Default null path to `"/"`** in request validator — matches the existing
behavior in the response validator
- **Respect `requiredBody` from `ValidationContext`** — when
`requiredBody=false`, suppress body-missing validation via LevelResolver
override
- **Decouple response error format from Accept header** — response validator
now always uses `SimpleValidationReportFormat` instead of selecting format
based on the request's Accept header
- **Add integration test** with real HTTP routes using
`camel-platform-http-vertx` and `rest-assured`, covering
body/schema/query/header validation and validation level overrides
- **Update documentation** with Maven dependency snippet, Java DSL usage
example, and validation level configuration example
## Test plan
- [ ] `mvn verify` in `components/camel-openapi-validator` — all 11 tests
pass (3 request validator unit + 2 response validator unit + 6 integration)
- [ ] Integration test `OpenApiValidatorIntegrationTest` exercises full HTTP
request flow through REST DSL routes with OpenAPI spec validation
- [ ] Existing unit tests (`OpenApiRestClientRequestValidatorTest`,
`OpenApiRestClientResponseValidatorTest`) continue to pass with the fixes
--
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]