alias OpenApiSpex.Operation
alias OpenApiSpex.Schema
alias Pleroma.Web.ApiSpec.Schemas.ChatMessageCreateRequest
- alias Pleroma.Web.ApiSpec.Schemas.ChatMessageResponse
- alias Pleroma.Web.ApiSpec.Schemas.ChatResponse
+ alias Pleroma.Web.ApiSpec.Schemas.ChatMessage
+ alias Pleroma.Web.ApiSpec.Schemas.Chat
import Pleroma.Web.ApiSpec.Helpers
Operation.response(
"The created or existing chat",
"application/json",
- ChatResponse
+ Chat
)
},
security: [
Operation.response(
"The newly created ChatMessage",
"application/json",
- ChatMessageResponse
+ ChatMessage
)
},
security: [
title: "ChatsResponse",
description: "Response schema for multiple Chats",
type: :array,
- items: ChatResponse,
+ items: Chat,
example: [
%{
"account" => %{
title: "ChatMessagesResponse",
description: "Response schema for multiple ChatMessages",
type: :array,
- items: ChatMessageResponse,
+ items: ChatMessage,
example: [
%{
"emojis" => [
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.Web.ApiSpec.Schemas.ChatResponse do
+defmodule Pleroma.Web.ApiSpec.Schemas.Chat do
alias OpenApiSpex.Schema
require OpenApiSpex
OpenApiSpex.schema(%{
- title: "ChatResponse",
+ title: "Chat",
description: "Response schema for a Chat",
type: :object,
properties: %{
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.Web.ApiSpec.Schemas.ChatMessageResponse do
+defmodule Pleroma.Web.ApiSpec.Schemas.ChatMessage do
alias OpenApiSpex.Schema
require OpenApiSpex
OpenApiSpex.schema(%{
- title: "ChatMessageResponse",
+ title: "ChatMessage",
description: "Response schema for a ChatMessage",
type: :object,
properties: %{