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

#[doc = include_str!("../xx.md")] or #[schemars(description = include_str!("xx.md"))] not work yet #204

Closed
liusong1111 opened this issue Feb 22, 2023 · 1 comment

Comments

@liusong1111
Copy link

Please consider it as a bug.

@GREsau
Copy link
Owner

GREsau commented Aug 24, 2024

Fixed in 1.0.0-alpha.11 - values in #[doc = ...] and #[schemars(description = ..., title = ...)] attributes may now be any arbitrary expression rather than just string literals, e.g.

#[derive(JsonSchema)]
#[doc = include_str!("../../README.md")]
pub struct MyStruct {
    #[schemars(description = include_str!("../../README.md"))]
    pub my_int: i32,
    pub my_bool: bool,
}

@GREsau GREsau closed this as completed Aug 24, 2024
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