[OpenAPI] Mark all not required request fields as nullable
[akkoma] / lib / pleroma / web / api_spec / operations / pleroma_account_operation.ex
index 9280d5d81445439c13cd8bfdb7332c9c2b81d02e..90922c064afa2d1f069e20bd4a8b24e913d5191e 100644 (file)
@@ -119,7 +119,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do
   def unsubscribe_operation do
     %Operation{
       tags: ["Accounts"],
-      summary: "Unsubscribe to stop receiving notifications from user statusesΒΆ",
+      summary: "Unsubscribe to stop receiving notifications from user statuses",
       operationId: "PleromaAPI.AccountController.unsubscribe",
       parameters: [id_param()],
       security: [%{"oAuth" => ["follow", "write:follows"]}],
@@ -143,6 +143,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do
       type: :object,
       properties: %{
         img: %Schema{
+          nullable: true,
           type: :string,
           format: :binary,
           description: "Image encoded using `multipart/form-data` or an empty string to clear"
@@ -158,6 +159,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaAccountOperation do
       properties: %{
         banner: %Schema{
           type: :string,
+          nullable: true,
           format: :binary,
           description: "Image encoded using `multipart/form-data` or an empty string to clear"
         }