feat: add schemars feature
Support dump json schema for downstream crates
Note that our contribution process encourages people to start with issues before posting PRs to make sure we have alignment on the problem and the solution, see https://github.com/crate-ci/git-conventional/blob/master/CONTRIBUTING.md#pull-requests
I am hesitant to take on schemars as a public feature / dependency but maybe now that its 1.0, it will be ok.
I very much want to see where orhun/git-cliff#1294 goes before considering merging this.
I left some comment:
https://github.com/orhun/git-cliff/pull/1296#pullrequestreview-3391829021
Sorry about that—I didn’t think it through enough. I originally saw this as a small improvement, so I didn’t open an issue first.
Given that the structs provided by git-conventional are relatively simple, defining Remote via schemars is a workable approach. The concrete steps will depend on how our Cliff PR progresses.
By the way, schemars has indeed reached 1.0 :D
Given that, adding schema-generation logic directly into the CLI might slightly drift away from the core purpose of git-cliff, which is primarily a changelog generator.
Similarly, this is drifting from the core purpose of this crate, a parser. It was a stretch already for add serde support (#7) and each time I see it brought up, I question its existence. We make no guarentees about the shape of the types we provide and people putting that in their public APIs comes at a risk. It would generally be better for people to copy into the types that they care about in a shape they define.