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

Add description attribute on ToSchema #949

Merged
merged 1 commit into from
May 24, 2024

Conversation

juhaku
Copy link
Owner

@juhaku juhaku commented May 24, 2024

Add support for overriding description with description attribute on ToSchema macro. Description attributes can be used type level of struts and enums.

Example of enum which uses description overriding.

 #[schema(
     description = include_str!("./testdata/description_override")
 )]
 enum SimpleEnum {
     Value1
 }

Resolves #802

Add support for overriding description with `description` attribute on
`ToSchema` macro. Description attributes can be used type level of
struts and enums.

Example of enum which uses description overriding.
```rust
 #[schema(
     description = include_str!("./testdata/description_override")
 )]
 enum SimpleEnum {
     Value1
 }
```

Resolves #802
@juhaku juhaku added the enhancement New feature or request label May 24, 2024
@juhaku juhaku merged commit 674d0b9 into master May 24, 2024
16 checks passed
@juhaku juhaku deleted the feature-description-for-to-schema-partially branch May 24, 2024 14:57
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 this pull request may close these issues.

Add support for overriding description (and summary) for path and ToSchema macros
1 participant