oscerd opened a new pull request, #28704: URL: https://github.com/apache/camel/pull/28704
This fixes [CAMEL-26197](https://issues.apache.org/jira/browse/CAMEL-26197), reported by @davsclaus. Two independent `batchCheck`/`listRelations` bugs in the `openfga` producer: ## 1. batchCheck with a Map body failed the whole exchange `OpenFgaProducer.bodyAsList` took the objects to check from a `Collection` body, or else converted the body to a `String` and split it on commas. A `Map` body (the shape of a single relationship tuple) was split from its `toString()` — `{user=user:anne, relation=reader, object=document:budget}` — and the pieces sent as object identifiers, so OpenFGA answered HTTP 400 and the exchange failed with an opaque error. Now a `Map` body is rejected up front with a message that says what `batchCheck` expects (a `List` or a comma-separated `String`), before any call is made. ## 2. listRelations returned a non-deterministic order `OpenFgaProducer.listRelations` returned the relations as the SDK handed them back. The SDK checks the requested relations in parallel and returns the ones that hold in completion order, so the list came back in a different order from one call to the next — awkward for a caller rendering or comparing it. Now the held relations are returned in the order the `relations` option lists them. ## Notes - No `@UriParam` / `@Metadata` / header / `.adoc` changes, so no catalog/dsl regeneration. - Two tests added to `OpenFgaOperationsTest` (the Map body is rejected without a call; `listRelations` reorders an owner-then-reader SDK answer back to the configured reader-then-owner). Full `camel-openfga` module build + tests green (126 unit, 18 IT). - Touches `OpenFgaProducer.java`, which #28703 (CAMEL-26408) also edits in a different method; whichever merges first, the other will be rebased. _Claude Code on behalf of oscerd_ 🤖 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]
