Add guidance around use of polymorphic types#147
Conversation
I Agree. In case of C++, the available tooling is so poor (or nonexistent) that:
Validation of yaml nodes against the schema is done ad-hoc. |
marcalff
left a comment
There was a problem hiding this comment.
LGTM.
Not related to this PR, but I think it is time to split README.md into multiple documents, and have a docs/ subdirectory.
That's too bad on the tooling. For what its worth, once the schema is stable, I'm strongly considering ripping out the code generation tooling from |
|
Re. tooling, on the go side i ended up having to split the model generation from the parsing logic, as the parsing code needed to be updated in a couple of places. I guess this is a good opportunity to help move the json schema ecosystem forward where possible. |
On multiple occasions I've tried to use
allOfto model polymporphic types only to be reminded that the jsonschema2pojo tool we're using in opentelemetry-java doesn't support anyOf, allOf, oneOf. I suspect this is the case in other languages as well.I propose we provide modeling guidance to explicitly avoid this tempting trap.