Skip to content

Conversation

@greenhat616
Copy link

Support dump json schema for downstream crates

@epage
Copy link
Contributor

epage commented Oct 27, 2025

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.

@epage epage marked this pull request as draft October 27, 2025 19:03
@ognis1205
Copy link

I left some comment:

orhun/git-cliff#1296 (review)

@greenhat616
Copy link
Author

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

@epage
Copy link
Contributor

epage commented Oct 29, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants