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 missing As attribute to complex enum #516

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

juhaku
Copy link
Owner

@juhaku juhaku commented Mar 13, 2023

Add missing As attribute to ToSchema complex enum. This allows renaming complex enum schemas same way as struct and simple enums are allowed.

 #[derive(ToSchema)]
 #[schema(as = named::BarBar)]
 enum BarBar {
     Foo { foo: Foobar },
 }

Relates #507

Add missing `As` attribute to `ToSchema` complex enum. This allows
renaming complex enum schemas same way as struct and simple enums are
allowed.
```rust
 #[derive(ToSchema)]
 #[schema(as = named::BarBar)]
 enum BarBar {
     Foo { foo: Foobar },
 }
```
@juhaku juhaku merged commit 53b96c3 into master Mar 13, 2023
@juhaku juhaku deleted the fix-missing-as-attribute-complex-enum branch March 13, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging this pull request may close these issues.

1 participant