- def id_param do
- Operation.parameter(:id, :path, FlakeID, "Chat ID",
- example: "9umDrYheeY451cQnEe",
- required: true
- )
- end
-
- def message_id_param do
- Operation.parameter(:message_id, :path, FlakeID, "Chat message ID",
- example: "9umDrYheeY451cQnEe",
- required: true
- )
+ def show_operation do
+ %Operation{
+ tags: ["chat"],
+ summary: "Create a chat",
+ operationId: "AdminAPI.ChatController.show",
+ parameters: [
+ Operation.parameter(
+ :id,
+ :path,
+ :string,
+ "The id of the chat",
+ required: true,
+ example: "1234"
+ )
+ ],
+ responses: %{
+ 200 =>
+ Operation.response(
+ "The existing chat",
+ "application/json",
+ Chat
+ )
+ },
+ security: [
+ %{
+ "oAuth" => ["read"]
+ }
+ ]
+ }