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

Document macro attributes #322

Closed
SorteKanin opened this issue Aug 20, 2024 · 4 comments
Closed

Document macro attributes #322

SorteKanin opened this issue Aug 20, 2024 · 4 comments

Comments

@SorteKanin
Copy link

Via this issue I just discovered that #[schemars(skip)] is a thing. However, where is this documented? I can't find anywhere that the actual attributes of the macro is documented. What other attributes are possible?

@GREsau
Copy link
Owner

GREsau commented Aug 20, 2024

All of the attributes are documented here:
https://graham.cool/schemars/deriving/attributes/

@SorteKanin
Copy link
Author

I see - I never found this site. The only prominent link seems to be from the GitHub sidebar, which I only notice now that I looked for it. I assumed the docs on docs.rs would be sufficient. I think in general, it's a good idea to have the docs.rs docs be complete for the library. Is there any specific reason you're using another site than docs.rs? It'd be helpful if the docs.rs contained all the relevant documentation.

@GREsau
Copy link
Owner

GREsau commented Aug 21, 2024

Fair point - I've now included the deriving/attributes docs in the derive macro's rustdoc: https://docs.rs/schemars/1.0.0-alpha.9/schemars/derive.JsonSchema.html

And I've linked to that rustdoc from the trait rustdoc: https://docs.rs/schemars/1.0.0-alpha.9/schemars/trait.JsonSchema.html

How does that look?

@SorteKanin
Copy link
Author

Excellent, very nice. Thank you.

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

No branches or pull requests

2 participants