Skip to content

duplicate-relationship-id

A Relationship id repeats in a Project.

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:7:13 error duplicate-relationship-id Relationship id "add-item" is already used in Project "shop" at shop/services.yaml:5

A Relationship has an id so that a Dynamic View Step, or an agent, can say which of several Relationships between two Elements it means. Two Relationships with the same id can’t be told apart.

shop/services.yaml:

services:
web:
name: Web
relationships:
- id: add-item
to: cart
- id: add-item
to: cart
description: Adds a gift card
cart:
name: Cart

Give one of the Relationships a different id.

shop/services.yaml:

services:
web:
name: Web
relationships:
- id: add-item
to: cart
- id: add-gift-card
to: cart
description: Adds a gift card
cart:
name: Cart
  • 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.
  • duplicate-id: An Element or Deployment Target id is declared twice in a Project, across files too, whatever its kind or nesting.

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