Skip to content

ambiguous-step

Several Relationships match a Dynamic View Step (several between the pair, or both a call and an event) and no relationship names one.

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:31:11 error ambiguous-step "shop:orders" → "shop:mailer" matches both a call (shop:notify) and an event (shop:mailer → shop:orders); name one with `relationship`

A Step takes its kind, a call or an event, and its default label from the Relationship it follows. When several Relationships match, Archidocs doesn’t guess which one the scenario means.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
cart:
name: Cart
components:
cart-api:
name: Cart API
orders:
name: Orders
relationships:
- id: notify
to: mailer
events:
name: Events
type: broker
mailer:
name: Mailer
relationships:
- to: orders
interaction: async
via: events
channel: order-placed
views:
dynamic:
purchase:
title: Purchase
steps:
- { from: orders, to: mailer }

Name the Relationship the Step takes with relationship: <id>.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
cart:
name: Cart
components:
cart-api:
name: Cart API
orders:
name: Orders
relationships:
- id: notify
to: mailer
events:
name: Events
type: broker
mailer:
name: Mailer
relationships:
- to: orders
interaction: async
via: events
channel: order-placed
views:
dynamic:
purchase:
title: Purchase
steps:
- { from: orders, to: mailer, relationship: notify }
  • missing-step: A Dynamic View Step has no Relationship or derived edge between from and to (nor a via subscription of to to from), or the named relationship doesn’t connect them.
  • duplicate-relationship-id: A Relationship id repeats in a Project.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.