-
Notifications
You must be signed in to change notification settings - Fork 218
"Examples" CLI import/export? #1068
Description
Problem statement: I would like to generate multiple diagrams for different examples of instantiating data in a data contract because it's helpful to show how data is persisted in different use cases/scenarios. As a consumer, it's easier to understand what you're getting and at design-time, it's easier to see how different use cases fit (or not) in a prospective data contract.
My first thought was to add an "examples" import and export like:
datacontract import --format examples --output target.odcs.yaml examples.yaml
datacontract export --format examples --output examples.yaml source.odcs.yaml
Merge/split examples into a format like:
Example1:
Schema.Shipment.ID: 0fb9ac46-d046-475b-964b-e44a7176aefb
Example2:
Schema.Shipment.ID: 1fb9ac46-d046-475b-964b-e44a7176aefb
...As long as the example values are ordered consistently when they're added to ODCS, they would be useful in a subsequent export w/ jinja template into mermaid, plantuml, whatever.
Would there be interest in adding this feature if I put up a PR?