Skip to content

Commit

Permalink
Document that and which placeholders can be used for declaring extra …
Browse files Browse the repository at this point in the history
…fields

Signed-off-by: Yannic Klem <Yannic.Klem@bosch.io>
  • Loading branch information
Yannic92 committed Mar 11, 2022
1 parent d233a2a commit b142cd8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
10 changes: 10 additions & 0 deletions documentation/src/main/resources/pages/ditto/basic-enrichment.md
Expand Up @@ -102,6 +102,16 @@ It is possible to use the wildcard operator '*' as feature ID and add a property
extraFields=features/*/properties/unit
```

If you however want to see a property only for the features changed within this event you could make use of placeholders.
The following example would enrich the definition of all features that have changed within this event.
```
extraFields=features/{{feature:id}}/definition
```
Please have a look at available placeholders for the use case:
* [Signal enrichment for Websocket](basic-placeholders.html#scope-websocket-signal-enrichment)
* [Signal enrichment for SSE](basic-placeholders.html#scope-sse-signal-enrichment)
* [Signal enrichment for connections](basic-placeholders.html#scope-connections)

## Enrich and filter

In combination with [event filtering](basic-changenotifications.html#filtering) enriched data can also be used to
Expand Down
24 changes: 24 additions & 0 deletions documentation/src/main/resources/pages/ditto/basic-placeholders.md
Expand Up @@ -151,6 +151,30 @@ or subscriptions for live messages, the following placeholders are available in
* [resource placeholder](basic-placeholders.html#resource-placeholder)
* [time placeholder](basic-placeholders.html#time-placeholder)

### Scope: Websocket Signal Enrichment
When [declaring extra fields](basic-enrichment.md) which should be enriched to a published signal for a Websocket connection, the following placeholders are available in general:
* [entity placeholder](basic-placeholders.html#entity-placeholder)
* [thing placeholder](basic-placeholders.html#thing-placeholder)
* [policy placeholder](basic-placeholders.html#policy-placeholder)
* [feature placeholder](basic-placeholders.html#feature-placeholder)
* [header placeholder](basic-placeholders.html#header-placeholder)
* [request placeholder](basic-placeholders.html#request-placeholder)
* [resource placeholder](basic-placeholders.html#resource-placeholder)
* [topic placeholder](basic-placeholders.html#topic-placeholder)
* [time placeholder](basic-placeholders.html#time-placeholder)

### Scope: SSE Signal Enrichment
When [declaring extra fields](basic-enrichment.md) which should be enriched to a published signal for a Websocket connection, the following placeholders are available in general:
* [entity placeholder](basic-placeholders.html#entity-placeholder)
* [thing placeholder](basic-placeholders.html#thing-placeholder)
* [policy placeholder](basic-placeholders.html#policy-placeholder)
* [feature placeholder](basic-placeholders.html#feature-placeholder)
* [header placeholder](basic-placeholders.html#header-placeholder)
* [request placeholder](basic-placeholders.html#request-placeholder)
* [resource placeholder](basic-placeholders.html#resource-placeholder)
* [topic placeholder](basic-placeholders.html#topic-placeholder)
* [time placeholder](basic-placeholders.html#time-placeholder)

### Scope: Connections

In [connections](basic-connections.html), the following placeholders are available in general:
Expand Down

0 comments on commit b142cd8

Please sign in to comment.