warning: a struct for OpenApiSpex.Cast.Error is expected on struct update:
%OpenApiSpex.Cast.Error{err | name: err.value}
but got type:
dynamic(%{..., name: nil, reason: :invalid_enum})
where "err" was given the type:
# type: dynamic(%{..., name: nil, reason: :invalid_enum})
# from: lib/pleroma/web/api_spec/render_error.ex:20:45
%{name: nil, reason: :invalid_enum} = err
when defining the variable "err", you must also pattern match on "%OpenApiSpex.Cast.Error{}".
hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of:
user = some_function()
%User{user | name: "John Doe"}
it is enough to write:
%User{} = user = some_function()
%{user | name: "John Doe"}
typing violation found at:
│
21 │ %OpenApiSpex.Cast.Error{err | name: err.value}
│ ~
│
└─ lib/pleroma/web/api_spec/render_error.ex:21:11: Pleroma.Web.ApiSpec.RenderError.call/2