Skip to content

Commit

Permalink
Merge branch '0.19.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
shadone committed Feb 12, 2024
2 parents a76f30d + e6f421a commit 3773630
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
redoc-static.html

# Created by https://www.toptal.com/developers/gitignore/api/macos,xcode,swiftpackagemanager
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,xcode,swiftpackagemanager

Expand Down
67 changes: 43 additions & 24 deletions Lemmy.yaml
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]
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -441,7 +448,7 @@ paths:
description: Add an admin to your site.
operationId: addAdmin
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Add Admin
required: true
Expand All @@ -467,7 +474,7 @@ paths:
description: Get the unread registration applications count.
operationId: getUnreadRegistrationApplicationCount
security:
- BearerAuth: []
- AdminAuth: []
responses:
'200':
description: Successful operation
Expand All @@ -486,7 +493,7 @@ paths:
description: List the registration applications
operationId: listRegistrationApplications
security:
- BearerAuth: []
- AdminAuth: []
parameters:
- in: query
name: unread_only
Expand All @@ -512,7 +519,7 @@ paths:
description: Approve a registration application.
operationId: approveRegistrationApplication
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Approve Registration Application
required: true
Expand All @@ -538,7 +545,7 @@ paths:
description: Purge / Delete a person from the database.
operationId: purgePerson
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Purge Person
required: true
Expand All @@ -560,7 +567,7 @@ paths:
description: Purge / Delete a community from the database.
operationId: purgeCommunity
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Purge Community
required: true
Expand All @@ -582,7 +589,7 @@ paths:
description: Purge / Delete a post from the database.
operationId: purgePost
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Purge Post
required: true
Expand All @@ -604,7 +611,7 @@ paths:
description: Purge / Delete a comment from the database.
operationId: purgeComment
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Purge Comment
required: true
Expand All @@ -626,7 +633,7 @@ paths:
description: Create a new custom emoji
operationId: createCustomEmoji
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Create Custom Emoji
required: true
Expand All @@ -650,7 +657,7 @@ paths:
description: Edit a new custom emoji
operationId: editCustomEmoji
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Edit Custom Emoji
required: true
Expand All @@ -676,7 +683,7 @@ paths:
description: Delete a new custom emoji
operationId: deleteCustomEmoji
security:
- BearerAuth: []
- AdminAuth: []
requestBody:
description: Delete Custom Emoji
required: true
Expand All @@ -698,7 +705,7 @@ paths:
description: Fetch federated instances.
operationId: getFederatedInstances
security:
- BearerAuth: []
- {}
responses:
'200':
description: Successful operation
Expand Down Expand Up @@ -770,7 +777,7 @@ paths:
description: Leave the Site admins.
operationId: leaveAdmin
security:
- BearerAuth: []
- AdminAuth: []
responses:
'200':
description: Successful operation
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1820,7 +1827,7 @@ paths:
$ref: '#/components/responses/ErrorResponse'
get:
tags:
- Comments
- Comment
summary: Get Comment
description: Get / fetch comment.
operationId: getComment
Expand Down Expand Up @@ -2001,7 +2008,7 @@ paths:
/comment/list:
get:
tags:
- Comments
- Comment
summary: Get Comments
description: Get / fetch comments.
operationId: getComments
Expand Down Expand Up @@ -2073,7 +2080,7 @@ paths:
/comment/report:
post:
tags:
- Comments
- Comment
summary: Report Comment
description: Report a comment.
operationId: reportComment
Expand Down Expand Up @@ -2394,6 +2401,8 @@ paths:
summary: Login
description: Login with a user account.
operationId: login
security:
- {}
requestBody:
description: User credential
required: true
Expand Down Expand Up @@ -2421,6 +2430,8 @@ paths:
summary: Logout
description: Logout from a user account.
operationId: logout
security:
- BearerAuth: []
responses:
'200':
$ref: '#/components/responses/SuccessResponse'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -6548,7 +6567,7 @@ components:
required:
- person_mention_view
properties:
person_mention_id:
person_mention_view:
$ref: '#/components/schemas/PersonMentionView'

GetRepliesResponse:
Expand Down
3 changes: 3 additions & 0 deletions scripts/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx @redocly/cli build-docs Lemmy.yaml
3 changes: 3 additions & 0 deletions scripts/validate.sh
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

0 comments on commit 3773630

Please sign in to comment.