Skip to content

duplicate-id

An Element or Deployment Target id is declared twice in a Project, across files too, whatever its kind or nesting.

Severity: error · Since: v1.0.0

For the failing example below, archidocs check prints:

shop/services.yaml:2:3 error duplicate-id Id "web" is already declared in Project "shop" at shop/more.yaml:2

A reference such as to: web has to name one thing. Ids are unique across the whole Project, whatever the kind or nesting, so moving an Element under another parent never changes its id.

shop/more.yaml:

services:
web:
name: Web v2

shop/services.yaml:

services:
web:
name: Web

Rename one of the Elements or Targets, or remove the second declaration.

shop/more.yaml:

services:
web-v2:
name: Web v2

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