-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
openapi: '3.1.0' | ||
info: | ||
title: Lemmy client API | ||
description: This is an unofficial OpenAPI spec for Lemmy client API. | ||
description: (unofficial) OpenAPI spec for Lemmy client API. | ||
contact: | ||
url: https://github.com/shadone/Lemmy-OpenAPI-Spec | ||
email: [email protected] | ||
|
@@ -21,14 +21,20 @@ tags: | |
description: Operations on users. | ||
- name: Post | ||
description: Operations on posts. | ||
- name: Comments | ||
- name: Community | ||
description: Operations on communities. | ||
- name: Comment | ||
description: Operations on comments. | ||
- name: Misc | ||
description: Miscellaneous operations. | ||
- name: Mod | ||
description: Moderator operations. | ||
- name: Admin | ||
description: Administrative operations. | ||
- name: Site | ||
description: Operations on Site. | ||
- name: Private Message | ||
description: Operations on Private Messages. | ||
|
||
paths: | ||
/user: | ||
|
@@ -148,12 +154,13 @@ paths: | |
/user/ban: | ||
post: | ||
tags: | ||
- User | ||
- Admin | ||
summary: Ban Person | ||
description: Ban a person from your site. | ||
operationId: banPerson | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Ban Person | ||
required: true | ||
|
@@ -441,7 +448,7 @@ paths: | |
description: Add an admin to your site. | ||
operationId: addAdmin | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Add Admin | ||
required: true | ||
|
@@ -467,7 +474,7 @@ paths: | |
description: Get the unread registration applications count. | ||
operationId: getUnreadRegistrationApplicationCount | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
responses: | ||
'200': | ||
description: Successful operation | ||
|
@@ -486,7 +493,7 @@ paths: | |
description: List the registration applications | ||
operationId: listRegistrationApplications | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
parameters: | ||
- in: query | ||
name: unread_only | ||
|
@@ -512,7 +519,7 @@ paths: | |
description: Approve a registration application. | ||
operationId: approveRegistrationApplication | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Approve Registration Application | ||
required: true | ||
|
@@ -538,7 +545,7 @@ paths: | |
description: Purge / Delete a person from the database. | ||
operationId: purgePerson | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Purge Person | ||
required: true | ||
|
@@ -560,7 +567,7 @@ paths: | |
description: Purge / Delete a community from the database. | ||
operationId: purgeCommunity | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Purge Community | ||
required: true | ||
|
@@ -582,7 +589,7 @@ paths: | |
description: Purge / Delete a post from the database. | ||
operationId: purgePost | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Purge Post | ||
required: true | ||
|
@@ -604,7 +611,7 @@ paths: | |
description: Purge / Delete a comment from the database. | ||
operationId: purgeComment | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Purge Comment | ||
required: true | ||
|
@@ -626,7 +633,7 @@ paths: | |
description: Create a new custom emoji | ||
operationId: createCustomEmoji | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Create Custom Emoji | ||
required: true | ||
|
@@ -650,7 +657,7 @@ paths: | |
description: Edit a new custom emoji | ||
operationId: editCustomEmoji | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Edit Custom Emoji | ||
required: true | ||
|
@@ -676,7 +683,7 @@ paths: | |
description: Delete a new custom emoji | ||
operationId: deleteCustomEmoji | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Delete Custom Emoji | ||
required: true | ||
|
@@ -698,7 +705,7 @@ paths: | |
description: Fetch federated instances. | ||
operationId: getFederatedInstances | ||
security: | ||
- BearerAuth: [] | ||
- {} | ||
responses: | ||
'200': | ||
description: Successful operation | ||
|
@@ -770,7 +777,7 @@ paths: | |
description: Leave the Site admins. | ||
operationId: leaveAdmin | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
responses: | ||
'200': | ||
description: Successful operation | ||
|
@@ -1224,7 +1231,7 @@ paths: | |
description: Hide a community from public / "All" view. Admins only. | ||
operationId: hideCommunity | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Hide Community | ||
required: true | ||
|
@@ -1820,7 +1827,7 @@ paths: | |
$ref: '#/components/responses/ErrorResponse' | ||
get: | ||
tags: | ||
- Comments | ||
- Comment | ||
summary: Get Comment | ||
description: Get / fetch comment. | ||
operationId: getComment | ||
|
@@ -2001,7 +2008,7 @@ paths: | |
/comment/list: | ||
get: | ||
tags: | ||
- Comments | ||
- Comment | ||
summary: Get Comments | ||
description: Get / fetch comments. | ||
operationId: getComments | ||
|
@@ -2073,7 +2080,7 @@ paths: | |
/comment/report: | ||
post: | ||
tags: | ||
- Comments | ||
- Comment | ||
summary: Report Comment | ||
description: Report a comment. | ||
operationId: reportComment | ||
|
@@ -2394,6 +2401,8 @@ paths: | |
summary: Login | ||
description: Login with a user account. | ||
operationId: login | ||
security: | ||
- {} | ||
requestBody: | ||
description: User credential | ||
required: true | ||
|
@@ -2421,6 +2430,8 @@ paths: | |
summary: Logout | ||
description: Logout from a user account. | ||
operationId: logout | ||
security: | ||
- BearerAuth: [] | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/SuccessResponse' | ||
|
@@ -2449,11 +2460,12 @@ paths: | |
post: | ||
tags: | ||
- Site | ||
- Admin | ||
summary: Create Site | ||
description: Create your site | ||
operationId: createSite | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Create Site | ||
required: true | ||
|
@@ -2473,11 +2485,12 @@ paths: | |
put: | ||
tags: | ||
- Site | ||
- Admin | ||
summary: Edit Site | ||
description: Edit your site | ||
operationId: editSite | ||
security: | ||
- BearerAuth: [] | ||
- AdminAuth: [] | ||
requestBody: | ||
description: Edit Site | ||
required: true | ||
|
@@ -2538,6 +2551,12 @@ components: | |
type: http | ||
scheme: bearer | ||
bearerFormat: JWT | ||
description: Bearer access token passed in Authorization header. | ||
AdminAuth: | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT | ||
description: The user with the bearer token needs to be a site Administrator. | ||
|
||
responses: | ||
ErrorResponse: | ||
|
@@ -6406,7 +6425,7 @@ components: | |
type: object | ||
description: A private message report response. | ||
required: | ||
- private_message_id | ||
- private_message_report_view | ||
properties: | ||
private_message_report_view: | ||
$ref: '#/components/schemas/PrivateMessageReportView' | ||
|
@@ -6548,7 +6567,7 @@ components: | |
required: | ||
- person_mention_view | ||
properties: | ||
person_mention_id: | ||
person_mention_view: | ||
$ref: '#/components/schemas/PersonMentionView' | ||
|
||
GetRepliesResponse: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
npx @redocly/cli build-docs Lemmy.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
npx @redocly/cli lint --skip-rule info-license-url Lemmy.yaml |