Skip to content

Commit

Permalink
fix: conflict with serde deny_unknown_fields attr
Browse files Browse the repository at this point in the history
When `#[serde(deny_unknown_fields)]` was used, the compilation failed with:
```
64 | #[derive(Debug, Serialize, Deserialize, ToSchema)]
   |                                         ^^^^^^^^ could not find `schema` in `salvo`
   |
   = note: this error originates in the derive macro `ToSchema` (in Nightly builds, run with -Z macro-backtrace for more info)
```
  • Loading branch information
Samyak2 committed Dec 30, 2024
1 parent 378e6a4 commit 92eedef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/schema/struct_schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ impl TryToTokens for NamedStructSchema<'_> {
.unwrap_or(false)
{
tokens.extend(quote! {
.additional_properties(Some(#oapi::schema::AdditionalProperties::FreeForm(false)))
.additional_properties(Some(#oapi::oapi::schema::AdditionalProperties::FreeForm(false)))
});
}

Expand Down

0 comments on commit 92eedef

Please sign in to comment.