Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component derive attribute manual implementation #195

Closed
kellpossible opened this issue Jun 27, 2022 · 4 comments · Fixed by #390
Closed

Component derive attribute manual implementation #195

kellpossible opened this issue Jun 27, 2022 · 4 comments · Fixed by #390
Labels
enhancement New feature or request

Comments

@kellpossible
Copy link
Contributor

kellpossible commented Jun 27, 2022

It would be nice to have a way to override a field property derive with a manual implementation in a similar style to serde serialize_with. Perhaps the comment for the field could be passed to the user defined function as a string to allow optional easy reuse in the description.

@kellpossible
Copy link
Contributor Author

kellpossible commented Jun 27, 2022

This would also allow working around any shortcomings in the short term that the derive may have in terms of schema expressability with attributes, without having to implement the entire component by hand or edit the component after generation.

@kellpossible
Copy link
Contributor Author

Same with IntoParams attributes

@kellpossible
Copy link
Contributor Author

The would also be good to have for response and request bodies.

@juhaku
Copy link
Owner

juhaku commented Jul 3, 2022

Yeah.. this could be neat escape hatch to configure attributes which are not available via derive or to configure programmatically items directly to the compiled documentation. Definitely could be added in future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants