Skip to content

Add copy doc feature - #196

Open
jphppd wants to merge 5 commits into
yanganto:mainfrom
jphppd:add-copy-doc-feature
Open

jphppd wants to merge 5 commits into
yanganto:mainfrom
jphppd:add-copy-doc-feature

Conversation

@jphppd

@jphppd jphppd commented Nov 7, 2026

Copy link
Copy Markdown

Hello maintainer,

thanks for your crate!

Here is a proposal for a new optional feature copy_doc: the purpose is to copy the doc of the initial structure (and its fields) to the patched structure.
The need/use-case is to be able to generate documentation automatically from/on the patched structure.

A typical example is when the expected structure for a http PATCH verb is, well, a derive(Patch) one, and when schemars is used to generate a json-schema of the API. It's nice, then, to have the documentation of the original field in the final schema.

Tell me if something else is needed!

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.

1 participant