Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross linking of event fields. #220

Open
1 task done
donaldpipowitch opened this issue Mar 2, 2022 · 0 comments
Open
1 task done

Cross linking of event fields. #220

donaldpipowitch opened this issue Mar 2, 2022 · 0 comments

Comments

@donaldpipowitch
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

Description

It would be lovely if we could link/reference from one event field to the field of a different event. Speaking about this view here:

image

Motivation

Imagine you have TradeCreated event with the two fields buyerId and sellerId. It would be lovely if both fields could link/reference to an id field in a UserCreated event. That way people can jump to UserCreated and from here on check related fields or other related events.

This feature request is not exactly about supporting $ref in JSON Schemas. As far as I know $ref references a complete (sub)-schema. If TradeCreated: buyerId and TradeCreated: sellerId would reference UserCreated: id directly they would inherit the description of UserCreated: id and could not provide there own. (But I might be wrong here.) So I'd still like to be able to write something like this:

UserCreated:
  properties:
    id:
      description: "Use this to reference any user."

TradeCreated:
  properties:
    buyerId:
      description: "References a user which has money and trades it for some goods."
    sellerId:
      description: "References a user which offers goods."

I wonder what would be the best way to support? Currently I could imagine two weeks:

  • extend JSON Schema somehow (misusing fields like $comment or adding custom fields)
  • provide an additional EventCatalog-specific document (something like a sitemap.xml, but for events)

In case of an EventCatalog-specific document it would be nice if we could design it in a way that it can be extended in the future. E.g. another feature we'd love to see would be placing events in "business process flows. E.g. something like this:

TradeRequested ----- TradeAccepted ----- TradeDelivered
               \
                 --- TradeRejected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant