Skip to content

Commit

Permalink
fix: Derive ToSchema not work for unit enum variants (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn authored Aug 18, 2024
1 parent 0fbcae7 commit 65df79a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/schema/enum_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ impl TryToTokens for UntaggedEnum {

tokens.extend(quote! {
#oapi::oapi::schema::Object::new()
.schema_type(#oapi::oapi::openapi::schema::BasicType::Null)
.schema_type(#oapi::oapi::schema::BasicType::Null)
.default_value(#oapi::oapi::__private::serde_json::Value::Null)
#title
});
Expand Down

1 comment on commit 65df79a

@cryscan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

Please sign in to comment.