Add names to additionalProperties
This commit is contained in:
parent
2a244b391d
commit
bddcb3ed68
6 changed files with 34 additions and 9 deletions
|
|
@ -133,7 +133,11 @@ defmodule Pleroma.Web.ApiSpec.PleromaEmojiFileOperation do
|
|||
defp files_object do
|
||||
%Schema{
|
||||
type: :object,
|
||||
additionalProperties: %Schema{type: :string},
|
||||
additionalProperties: %Schema{
|
||||
type: :string,
|
||||
description: "Filename of the emoji",
|
||||
extensions: %{"x-additionalPropertiesName": "Emoji name"}
|
||||
},
|
||||
description: "Object with emoji names as keys and filenames as values"
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -231,7 +231,10 @@ defmodule Pleroma.Web.ApiSpec.PleromaEmojiPackOperation do
|
|||
"application/json",
|
||||
%Schema{
|
||||
type: :object,
|
||||
additionalProperties: emoji_pack(),
|
||||
additionalProperties: %Schema{
|
||||
emoji_pack()
|
||||
| extensions: %{"x-additionalPropertiesName": "Pack name"}
|
||||
},
|
||||
example: %{
|
||||
"emojos" => emoji_pack().example
|
||||
}
|
||||
|
|
@ -274,7 +277,11 @@ defmodule Pleroma.Web.ApiSpec.PleromaEmojiPackOperation do
|
|||
defp files_object do
|
||||
%Schema{
|
||||
type: :object,
|
||||
additionalProperties: %Schema{type: :string},
|
||||
additionalProperties: %Schema{
|
||||
type: :string,
|
||||
description: "Filename",
|
||||
extensions: %{"x-additionalPropertiesName": "Emoji name"}
|
||||
},
|
||||
description: "Object with emoji names as keys and filenames as values"
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do
|
|||
properties: %{
|
||||
image_url: %Schema{type: :string},
|
||||
tags: %Schema{type: :array, items: %Schema{type: :string}}
|
||||
}
|
||||
},
|
||||
extensions: %{"x-additionalPropertiesName": "Emoji name"}
|
||||
},
|
||||
example: %{
|
||||
"firefox" => %{
|
||||
|
|
@ -53,7 +54,12 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do
|
|||
200 =>
|
||||
Operation.response("List", "application/json", %Schema{
|
||||
type: :object,
|
||||
additionalProperties: %Schema{type: :object}
|
||||
additionalProperties: %Schema{
|
||||
type: :object,
|
||||
description:
|
||||
"Opaque object representing the instance-wide configuration for the frontend",
|
||||
extensions: %{"x-additionalPropertiesName": "Frontend name"}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,11 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
|
|||
properties: %{
|
||||
content: %Schema{
|
||||
type: :object,
|
||||
additionalProperties: %Schema{type: :string},
|
||||
additionalProperties: %Schema{
|
||||
type: :string,
|
||||
description: "Alternate representation in the MIME type specified",
|
||||
extensions: %{"x-additionalPropertiesName": "MIME type"}
|
||||
},
|
||||
description:
|
||||
"A map consisting of alternate representations of the `content` property with the key being it's mimetype. Currently the only alternate representation supported is `text/plain`"
|
||||
},
|
||||
|
|
@ -195,7 +199,11 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
|
|||
},
|
||||
spoiler_text: %Schema{
|
||||
type: :object,
|
||||
additionalProperties: %Schema{type: :string},
|
||||
additionalProperties: %Schema{
|
||||
type: :string,
|
||||
description: "Alternate representation in the MIME type specified",
|
||||
extensions: %{"x-additionalPropertiesName": "MIME type"}
|
||||
},
|
||||
description:
|
||||
"A map consisting of alternate representations of the `spoiler_text` property with the key being it's mimetype. Currently the only alternate representation supported is `text/plain`."
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue