feat(gen): add ability to pass type metadata#526
Conversation
e7ca557 to
63b6234
Compare
|
Is there a reason the existing metadata is not enough? |
|
Unfortunately current metadata is not enough (at least very inconvenient) when it comes to mapping of schema metadata -> typedef metadata. In the template Typedefs have different names compared to schemas: Lines 311 to 316 in 5c80dfb Since Typedef names are rendered using unexported Exporting |
|
@nrwiersma what do you think? can we proceed with the proposed change? 🙏🏻 |
|
@ljank I am away at the moment, will take a look when I find some time. |
nrwiersma
left a comment
There was a problem hiding this comment.
Please fix the linter issues, then I think it is good to go.
We're looking for ways to pass down some schema metadata to the template, e.g. we have a need for the original schema subject identifier in the generated Go struct. This change allows to pass arbitrary metadata while parsing the schema and have that metadata available in the template.
d32371d to
77e7dab
Compare
Goal of this PR
We're looking for ways to pass down some schema metadata to the template, e.g. we have a need for the original schema subject identifier in the generated Go struct.
This change allows to pass arbitrary metadata while parsing the schema and have that metadata available in the template.
How did I test it?
go test