return-without-relationship
A Dynamic View return Step has no Relationship the other way, from its to to its from.
Severity: error · Since: v1.0.0
What check reports
Section titled “What check reports”For the failing example below, archidocs check prints:
shop/services.yaml:28:11 error return-without-relationship A return from "shop:web" to "shop:cart" needs a Relationship from "shop:cart" to "shop:web"A return Step is the provider’s reply to a consumer, so it follows a Relationship the other way round: from its to to its from. With no such Relationship there is no call for it to be the reply to.
Failing example
Section titled “Failing example”shop/services.yaml:
services: web: name: Web relationships: - to: cart cart: name: Cart components: cart-api: name: Cart API orders: name: Orders events: name: Events type: broker mailer: name: Mailer relationships: - to: orders interaction: async via: events channel: order-placedviews: dynamic: purchase: title: Purchase steps: - { from: web, to: cart, return: true }Turn the Step round, or remove return: true if it is a call of its own.
shop/services.yaml:
services: web: name: Web relationships: - to: cart cart: name: Cart components: cart-api: name: Cart API orders: name: Orders events: name: Events type: broker mailer: name: Mailer relationships: - to: orders interaction: async via: events channel: order-placedviews: dynamic: purchase: title: Purchase steps: - { from: web, to: cart } - { from: cart, to: web, return: true }Related rules
Section titled “Related rules”return-on-async: A Dynamic View return Step resolves to an async Relationship, which has no reply.missing-step: A Dynamic View Step has no Relationship or derived edge betweenfromandto(nor aviasubscription oftotofrom), or the namedrelationshipdoesn’t connect them.
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.