Skip to content

return-without-relationship

Severity: error

A Dynamic View return Step has no Relationship the other way, from its to to its from.

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-placed
views:
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-placed
views:
dynamic:
purchase:
title: Purchase
steps:
- { from: web, to: cart }
- { from: cart, to: web, return: true }