(b []byte)
| 1390 | } |
| 1391 | |
| 1392 | func (o *OmittableNullable[T]) UnmarshalJSON(b []byte) error { |
| 1393 | if len(b) > 0 { |
| 1394 | o.Sent = true |
| 1395 | if bytes.Equal(b, []byte("null")) { |
| 1396 | o.Null = true |
| 1397 | return nil |
| 1398 | } |
| 1399 | return json.Unmarshal(b, &o.Value) |
| 1400 | } |
| 1401 | return nil |
| 1402 | } |
| 1403 | |
| 1404 | func (o OmittableNullable[T]) Schema(r huma.Registry) *huma.Schema { |
| 1405 | s := r.Schema(reflect.TypeOf(o.Value), true, "") |