spc-pleroma/lib/pleroma/web/api_spec/operations
Mark Felder db87be126e Pleroma.Web.AdminAPI.InviteController: dialyzer errors
lib/pleroma/web/admin_api/controllers/invite_controller.ex:46:call
The function call will not succeed.

Phoenix.Controller.render(
  _conn :: %{:body_params => %{:token => _, _ => _}, _ => _},
  <<115, 104, 111, 119, 46, 106, 115, 111, 110>>,
  [
    {:invite,
     %Pleroma.UserInviteToken{
       :__meta__ => _,
       :expires_at => _,
       :id => _,
       :inserted_at => _,
       :invite_type => _,
       :max_use => _,
       :token => _,
       :updated_at => _,
       :used => _,
       :uses => _
     }},
    ...
  ]
)

will never return since the success typing is:
(
  %Plug.Conn{
    :adapter => {atom(), _},
    :assigns => %{atom() => _},
    :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :halted => boolean(),
    :host => binary(),
    :method => binary(),
    :owner => pid(),
    :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :path_info => [binary()],
    :path_params => %{binary() => binary() | [any()] | map()},
    :port => char(),
    :private => %{atom() => _},
    :query_params => %Plug.Conn.Unfetched{
      :aspect => atom(),
      binary() => binary() | [any()] | map()
    },
    :query_string => binary(),
    :remote_ip =>
      {byte(), byte(), byte(), byte()}
      | {char(), char(), char(), char(), char(), char(), char(), char()},
    :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()},
    :req_headers => [{_, _}],
    :request_path => binary(),
    :resp_body =>
      nil
      | binary()
      | maybe_improper_list(
          binary() | maybe_improper_list(any(), binary() | []) | byte(),
          binary() | []
        ),
    :resp_cookies => %{binary() => map()},
    :resp_headers => [{_, _}],
    :scheme => :http | :https,
    :script_name => [binary()],
    :secret_key_base => nil | binary(),
    :state =>
      :chunked | :file | :sent | :set | :set_chunked | :set_file | :unset | :upgraded,
    :status => nil | non_neg_integer()
  },
  atom() | binary(),
  atom() | binary() | [{_, _}] | map()
) :: %Plug.Conn{
  :adapter => {atom(), _},
  :assigns => %{atom() => _},
  :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
  :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
  :halted => boolean(),
  :host => binary(),
  :method => binary(),
  :owner => pid(),
  :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
  :path_info => [binary()],
  :path_params => %{binary() => binary() | [any()] | map()},
  :port => char(),
  :private => %{atom() => _},
  :query_params => %Plug.Conn.Unfetched{
    :aspect => atom(),
    binary() => binary() | [any()] | map()
  },
  :query_string => binary(),
  :remote_ip =>
    {byte(), byte(), byte(), byte()}
    | {char(), char(), char(), char(), char(), char(), char(), char()},
  :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()},
  :req_headers => [{_, _}],
  :request_path => binary(),
  :resp_body =>
    nil
    | binary()
    | maybe_improper_list(
        binary() | maybe_improper_list(any(), binary() | []) | byte(),
        binary() | []
      ),
  :resp_cookies => %{binary() => map()},
  :resp_headers => [{_, _}],
  :scheme => :http | :https,
  :script_name => [binary()],
  :secret_key_base => nil | binary(),
  :state => :sent,
  :status => nil | non_neg_integer()
}

and the contract is
(Plug.Conn.t(), binary() | atom(), Keyword.t() | map()) :: Plug.Conn.t()

________________________________________________________________________________
lib/pleroma/web/admin_api/controllers/invite_controller.ex:66:call
The function call will not succeed.

Pleroma.Web.ControllerHelper.json_response(
  _conn :: %{
    :assigns => %{:user => _, _ => _},
    :body_params => %{:email => _, _ => _},
    _ => _
  },
  :no_content,
  <<>>
)

will never return since the 1st arguments differ
from the success typing arguments:

(
  %Plug.Conn{
    :adapter => {atom(), _},
    :assigns => %{atom() => _},
    :body_params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :halted => boolean(),
    :host => binary(),
    :method => binary(),
    :owner => pid(),
    :params => %Plug.Conn.Unfetched{:aspect => atom(), binary() => _},
    :path_info => [binary()],
    :path_params => %{
      binary() =>
        binary() | [binary() | [any()] | map()] | %{binary() => binary() | [any()] | map()}
    },
    :port => char(),
    :private => %{atom() => _},
    :query_params => %Plug.Conn.Unfetched{
      :aspect => atom(),
      binary() =>
        binary() | [binary() | [any()] | map()] | %{binary() => binary() | [any()] | map()}
    },
    :query_string => binary(),
    :remote_ip =>
      {byte(), byte(), byte(), byte()}
      | {char(), char(), char(), char(), char(), char(), char(), char()},
    :req_cookies => %Plug.Conn.Unfetched{:aspect => atom(), binary() => binary()},
    :req_headers => [{binary(), binary()}],
    :request_path => binary(),
    :resp_body =>
      nil
      | binary()
      | maybe_improper_list(
          binary() | maybe_improper_list(any(), binary() | []) | byte(),
          binary() | []
        ),
    :resp_cookies => %{binary() => map()},
    :resp_headers => [{binary(), binary()}],
    :scheme => :http | :https,
    :script_name => [binary()],
    :secret_key_base => nil | binary(),
    :state =>
      :chunked | :file | :sent | :set | :set_chunked | :set_file | :unset | :upgraded,
    :status => nil | non_neg_integer()
  },
  atom() | 1..1_114_111,
  any()
)
2024-01-28 15:53:47 -05:00
..
admin Pleroma.Web.AdminAPI.InviteController: dialyzer errors 2024-01-28 15:53:47 -05:00
account_operation.ex Fix some more typos 2023-12-28 00:17:04 +01:00
announcement_operation.ex Force spec for every operation to have a listed tag 2023-01-15 18:31:37 -05:00
app_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
chat_operation.ex Pleroma.Web.PleromaAPI.ChatController: Dialyzer error 2024-01-28 15:52:09 -05:00
conversation_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
custom_emoji_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
directory_operation.ex Force spec for every operation to have a listed tag 2023-01-15 18:31:37 -05:00
domain_block_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
emoji_reaction_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
filter_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
follow_request_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
instance_operation.ex Fix some more typos 2023-12-28 00:17:04 +01:00
list_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
marker_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
media_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
notification_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_account_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_app_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_backup_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_conversation_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_emoji_file_operation.ex Pleroma.Web.PleromaAPI.EmojiFileController: dialyzer errors 2024-01-28 15:52:09 -05:00
pleroma_emoji_pack_operation.ex Pleroma.Web.PleromaAPI.EmojiPackController: dialyzer errors 2024-01-28 15:52:09 -05:00
pleroma_instances_operation.ex Force spec for every operation to have a listed tag 2023-01-15 18:31:37 -05:00
pleroma_mascot_operation.ex Pleroma.Web.PleromaAPI.MascotController: dialyzer errors 2024-01-28 15:52:09 -05:00
pleroma_notification_operation.ex Pleroma.Web.PleromaAPI.NotificationController: dialyzer errors 2024-01-27 16:15:03 -05:00
pleroma_report_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_scrobble_operation.ex Fix some more typos 2023-12-28 00:17:04 +01:00
pleroma_settings_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
pleroma_status_operation.ex Count and display post quotes 2023-11-12 13:38:08 +00:00
poll_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
report_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
scheduled_activity_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
search_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
status_operation.ex Fix some more typos 2023-12-28 00:17:04 +01:00
streaming_operation.ex Fix duplicated schema names 2023-10-15 17:20:26 -04:00
subscription_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
timeline_operation.ex Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
twitter_util_operation.ex Pleroma.Web.TwitterAPI.UtilController: dialyzer fixes 2024-01-27 15:47:07 -05:00
user_import_operation.ex Pleroma.Web.PleromaAPI.UserImportController: Dialyzer errors 2024-01-27 15:57:21 -05:00