Skip to content

Improve batch documentation: Content-ID references, $$ syntax, and atomicityGroup (changeset) support #87

@kbarbounakis

Description

@kbarbounakis

Is your feature request related to a problem? Please describe.

While the batch feature in OData v4 in themost-framework/express has evolved to support Content-ID ($id) referencing, there is significant interest and need for:

  • Robust and clear documentation explaining standard batch Content-ID referencing (via $id in URLs)
  • An extension supporting value replacement from previous requests using a double-dollar syntax ($$id.property) within request bodies
  • Explicit documentation for atomicityGroup (changeset) support for transactional (all-or-nothing) batch groups
  • Best practices for dependency handling, error handling (including 424 Failed Dependency), advanced usage (arrays, nested objects), and migration from single operations to batch + transactions

These features offer complex batch workflows, but developers lack a single, authoritative reference for implementation, examples, and limitations.

Describe the solution you'd like

Develop a comprehensive batch documentation covering:

  • OData v4 Content-ID referencing ($id in URLs; using Location/@odata.id from previous results)
  • Double-dollar value reference extension ($$id.property for referencing body values of previous requests, including nested/object/array access)
  • Use and meaning of atomicityGroup for grouping requests as an atomic transaction (changeset)
  • Table of contents, overview, basic and advanced examples, error/roll-back handling, troubleshooting, best practices, API reference, configuration, and FAQ
  • Guidance on migration from classic or non-batch patterns
  • Practical real-world scenarios (e.g., order workflows, bulk import, financial transfer, tenant migration)

Describe alternatives you've considered

  • Learning by trial and error (slow, error-prone)
  • Reading OData spec and piecing together scattered information
  • Reaching out to maintainers for clarification

Additional context

  • An example documentation draft has been prepared (see conversation in this request for content and structure)
  • See also: OData v4 Batch Protocol, docs, changesets, Content-ID, and best practices from large OData APIs
  • Potential for this documentation to serve as a reference standard for future contributors
  • Should include diagrams/tables when possible for clarity
  • Documentation should be accessible from the README and as a standalone detailed page/file

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions