Visitar URL original
OpenAPI: declare the optional isolationLevel request body on POST /api/v1/begin/{database} · Issue #10295 · ArcadeData/arcadedb · GitHub
Skip to content

OpenAPI: declare the optional isolationLevel request body on POST /api/v1/begin/{database} #10295

Closed

Description

@robfrank

POST /api/v1/begin/{database} accepts an optional JSON body carrying isolationLevel, but the OpenAPI spec doesn't declare it. createBeginPath() in CoreApiSpec sets no requestBody, so clients generated from the spec have no way to open a transaction at a chosen isolation level.

What the server does today

PostBeginHandler reads it:

final String isolationLevel = payload != null ? payload.getString("isolationLevel", null) : null;
if (isolationLevel != null)
  database.begin(Database.TRANSACTION_ISOLATION_LEVEL.valueOf(isolationLevel));
else
  database.begin();

So the accepted values are exactly the engine enum, READ_COMMITTED and REPEATABLE_READ. Anything else fails valueOf.

Requested

Declare an optional application/json request body on beginTransaction:

  • isolationLevel: string, enum: [READ_COMMITTED, REPEATABLE_READ], optional. Absent means the database's default isolation.
  • Document the response to an unknown value (it should be a 400 from the IllegalArgumentException arm, not a 500).

A related inconsistency in gRPC (for awareness)

The gRPC TransactionIsolation enum offers four values, and ArcadeDbGrpcService.mapIsolationLevel silently maps READ_UNCOMMITTED to READ_COMMITTED and SERIALIZABLE to REPEATABLE_READ. A gRPC caller who asks for SERIALIZABLE gets a weaker level with no signal. HTTP, by contrast, rejects anything outside the engine enum. It would help to document the downgrade on the proto enum, or refuse levels the engine doesn't provide.

Context

This came up downstream in ArcadeData/arcadedb-drivers#152. The drivers generate their typed surface from the published contract, so they can't expose HTTP isolation until the spec declares it.

Activity

  1. added
    documentationImprovements or additions to documentation
    enhancementNew feature or request
    serverCore server: HTTP API, users, security enforcement
    severity:minorCosmetic, documentation, edge case, or a workaround exists
    on Oct 18, 2026
  2. self-assigned this
    on Oct 18, 2026
  3. added this to the 26.11.1 milestone on Oct 18, 2026
  4. added a commit that references this issue on Oct 18, 2026
  5. robfrank commented on Oct 18, 2026

    @robfrank
    CollaboratorAuthor

    Fixed in #10318. The OpenAPI spec now declares the optional request body of POST /api/v1/begin/{database}, with isolationLevel as an enum generated from the server's own list, so the spec and the server stay in sync. An unknown or non-string value now returns a 400 that names the parameter and lists the allowed values, and no session is created. Before, a one-element array was silently accepted and other bad values produced a raw No enum constant error. For gRPC, the docs now say that SERIALIZABLE runs as REPEATABLE_READ and READ_UNCOMMITTED as READ_COMMITTED.

    Still open:


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  6. removed
    in progressThe team is actively working on this issue
    on Oct 18, 2026
  7. added a commit that references this issue on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestserverCore server: HTTP API, users, security enforcementseverity:minorCosmetic, documentation, edge case, or a workaround exists

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions