eventcatalog icon indicating copy to clipboard operation
eventcatalog copied to clipboard

Support External Schema References

Open public-daniel opened this issue 2 years ago • 3 comments

Have you read the Contributing Guidelines on issues?

Description

Support external references within JSON schemas for events

Motivation

This would be useful for events that share some common properties. For example, we have a "Timestamps" object that we attach to every event, and ideally we could reference an external (local) file instead of duplicating it into each individual event schema

public-daniel avatar Feb 12 '22 02:02 public-daniel

Hi @public-daniel,

Thank you for the idea/issue!

Yeah an interesting idea for sure, any thoughts on how it would work? I know you can use refs, are you using JSON Schema?

boyney123 avatar Feb 16 '22 10:02 boyney123

Hi

A really good example of this requirement is using CloudEvents with AsyncAPI Here are a couple of examples where the CE spec is referenced: https://gist.github.com/lbroudoux/035ccc4d7b7cdd414f0ebc5a53e80c4c https://microcks.io/blog/simulating-cloudevents-with-asyncapi/#structured-content-mode

We are using AsyncAPI/CloudEvents this way

StanClowes avatar Jan 25 '23 15:01 StanClowes

As @StanClowes suggests. This feature would be extremely useful for cloud events adopters.

luke-gee avatar Dec 12 '23 10:12 luke-gee