Skip to content

ancestor-descendant-relationship

An Element is linked to its own ancestor or descendant.

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:8:17 error ancestor-descendant-relationship Component "web-ui" is inside Service "web", so it can't have a Relationship to it

A Component is part of its Service, and a Service part of its System; the nesting already says so. A Relationship between an Element and its own ancestor can’t be drawn at the ancestor’s level, where both ends are the same node.

shop/services.yaml:

services:
web:
name: Web
components:
web-ui:
name: Web UI
relationships:
- to: web

Point to at an Element outside the consumer’s own branch, such as a sibling.

shop/services.yaml:

services:
web:
name: Web
components:
web-ui:
name: Web UI
relationships:
- to: web-api
web-api:
name: Web API

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