Skip to content

Positive suite: scalar seed values ignore schema string format (e.g. format: email → 400) #397

@esraagamal6

Description

@esraagamal6

Summary

The positive-suite request-body builder seeds string fields ignoring the schema's format. For addCollaborator (POST /workspaces/{workspaceKey}/collaborators), the email field is type: string, format: email, but the generator seeds a value like emailVar-<salt>, which is not a valid email → the server rejects the request with 400 "Request body is not readable".

Found while running the camunda-hub positive suite against a live server.

Evidence

Emitted body:

const body2 = { email: ctx.emailVar, role: 'workspace_admin' };  // ctx.emailVar = "emailVar-<salt>"

Curl with the generator-shaped value:

POST /api/v2/workspaces/<realKey>/collaborators
{ "email": "emailVar-abc", "role": "workspace_admin" }
→ 400  {"title":"Bad Request","detail":"Request body is not readable"}

A real email value is accepted; the seed value is the problem.

Expected

Seed/placeholder values for scalar fields should respect the schema's format (and pattern). At minimum, format: email → a syntactically valid email (e.g. seed-<salt>@example.com); ideally extend to other common formats (uuid, date-time, uri, etc.).

Scope

Same family as other request-body value-quality gaps (e.g. search filters previously emitting empty objects, fixed in #396). This issue covers format-aware scalar seeds.

  • Affected today: addCollaborator (camunda-hub) → 400.
  • Likely location: the canonical/seed value generator in path-analyser (seedBindings / the 'placeholder' scalar fallback in buildRequestBodyFromCanonical / synthesizeObjectFromPrefix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions