Skip to content
Failed

Changes

Summary

  1. Batch reference resolution: bind$.jsonPathExpr + @#GlobalVar@ in v1/batch (#517) (commit: 427280b) (details)
Commit 427280be32686d308addb3bd78a3816c82707d89 by noreply
Batch reference resolution: bind$.jsonPathExpr + @#GlobalVar@ in v1/batch (#517)

* Add @Table.Column / @bind.Column / @#GlobalVar reference resolution to v1/batch

* Fix @#GlobalVar snapshot and reject duplicate batch aliases

Snapshot the calling session's context before any sub-request runs so
@#GlobalVar resolution isn't affected by ServerContext.dispose() calls
triggered by earlier sub-requests in the same batch.

Also reject an "as" alias that was already used earlier in the batch,
addressing CodeRabbit feedback on #517: previously a duplicate alias
would silently overwrite the earlier sub-request's entry in
referenceCache, causing later @bind.Column references to resolve
against the wrong sub-request.

* Require closing @ for batch reference tokens, delegate global vars to Env.parseContext

unify the reference grammar to match iDempiere's

* Use sessionCtx snapshot for MTable lookups instead of the disposable live context

* Add @bind$.jsonPathExpr@ batch reference support

Per Heng Sin's alternative on #516: standard JSONPath (RFC 9535)
against a prior sub-request's response, for nested/array access
@bind.Column@ can't do. Embeds json-path/json-smart/accessors-smart;
slf4j/asm are imported from iDempiere's own OSGi bundles instead.

* Extract BatchReferenceResolver to fix clean-code issues from this PR

* Drop flat @Table.Column@/@bind.Column@, standardize on bare JSONPath

* Only recognize #/$/+ prefixed context vars, not any @...@ literal

* Make batch responseAlias mandatory, drop tableName-based chaining, update docs

* Wrap batch alias/JSONPath references in @...@, make responseAlias optional

* Fix illegal multi-catch of InvalidPathException and its subclass PathNotFoundException
(commit: 427280b)
The file was modifiedcom.trekglobal.idempiere.rest.api/.classpath (diff)
The file was modifiedcom.trekglobal.idempiere.rest.api/postman/trekglobal-idempiere-rest.postman_collection.json (diff)
The file was modifiedcom.trekglobal.idempiere.rest.api/META-INF/MANIFEST.MF (diff)
The file was modifiedcom.trekglobal.idempiere.rest.api/src/com/trekglobal/idempiere/rest/api/v1/resource/BatchRequestResource.java (diff)
The file was modifiedcom.trekglobal.idempiere.rest.api/src/com/trekglobal/idempiere/rest/api/v1/resource/impl/BatchRequestResourseImpl.java (diff)
The file was modifiedcom.trekglobal.idempiere.rest.api/pom.xml (diff)
The file was modifiedcom.trekglobal.idempiere.rest.api/openapi/idempiere-rest.yml (diff)