Skip to content

Commit

Permalink
Fix bug in type check
Browse files Browse the repository at this point in the history
  • Loading branch information
bralax committed Oct 12, 2024
1 parent 1ca521e commit 12130a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions schemars_derive/src/schema_exprs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ fn expr_for_internally_tagged_newtype_field(field: &Field) -> SchemaExpr {
<#ty as schemars::JsonSchema>::json_schema(#GENERATOR)
} else {
let subschema = <#ty as schemars::JsonSchema>::json_schema(#GENERATOR);
dbg!();
if let Some(type_val) = subschema.get("type") {
if (type_val.as_str().unwrap() != "None") {
if (type_val.as_str().unwrap() != "null") {
let mut map = schemars::_private::serde_json::Map::new();
map.insert(
#keyword.into(),
Expand Down

0 comments on commit 12130a2

Please sign in to comment.