Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21842229
pleroma_app_operation.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
949 B
Referenced Files
None
Subscribers
None
pleroma_app_operation.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.ApiSpec.PleromaAppOperation
do
alias
OpenApiSpex.Operation
alias
OpenApiSpex.Schema
alias
Pleroma.Web.ApiSpec.Schemas.App
def
open_api_operation
(
action
)
do
operation
=
String
.
to_existing_atom
(
"
#{
action
}
_operation"
)
apply
(
__MODULE__
,
operation
,
[])
end
@spec
index_operation
()
::
Operation
.
t
()
def
index_operation
do
%
Operation
{
tags
:
[
"Applications"
],
summary
:
"List applications"
,
description
:
"List the OAuth applications for the current user"
,
operationId
:
"AppController.index"
,
responses
:
%{
200
=>
Operation
.
response
(
"Array of App"
,
"application/json"
,
array_of_apps
())
}
}
end
defp
array_of_apps
do
%
Schema
{
type
:
:array
,
items
:
App
,
example
:
[
App
.
schema
()
.
example
]}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Dec 27, 11:51 PM (9 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
714711
Default Alt Text
pleroma_app_operation.ex (949 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment