Using $ref
in definition objects
#105
StreakyCobra
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I’m currently experimenting with the data contract specification and its associated CLI. During my tests, I noticed that using
$ref
in definition objects is not working. I assume this is expected, as the specification does not list$ref
as a field of "Definition" objects.Adding support for this use case would simplify working with complex data models: the use of
$ref
in definition objects would significantly improve composability and reduce repetition in models and definitions.An example is provided below for reference.
Here are a few questions to start the discussion:
$ref
in definitions is not supported at the moment?Looking forward to answers and discussion.
Cheers,
Fabien
Trying to export this data contract as AVRO or Protobuf results in an erroneous schema.
Avro:
datacontract-cli
version:0.10.14
datacontract export --format avro minimal.yaml
The ID fields are of type
["null", "null"]
instead of["null", "string"]
:Protobuf:
datacontract-cli
version:0.10.14
datacontract export --format protobuf minimal.yaml
The ID fields are of type
None
instead ofstring
:Beta Was this translation helpful? Give feedback.
All reactions