mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: openapi schema for ap routes
This commit is contained in:
@@ -356,7 +356,9 @@ paths:
|
||||
$ref: 'read/groups/slug.yaml'
|
||||
"/api/groups/{slug}/members":
|
||||
$ref: 'read/groups/slug/members.yaml'
|
||||
"/api/world":
|
||||
/api/world:
|
||||
$ref: 'read/world.yaml'
|
||||
/api/ap:
|
||||
$ref: 'read/ap.yaml'
|
||||
/api/outgoing:
|
||||
$ref: 'read/outgoing.yaml'
|
||||
@@ -142,6 +142,11 @@ get:
|
||||
properties:
|
||||
size:
|
||||
type: number
|
||||
activitypub:
|
||||
type: object
|
||||
properties:
|
||||
probe:
|
||||
type: number
|
||||
acpLang:
|
||||
type: string
|
||||
openOutgoingLinksInNewTab:
|
||||
|
||||
31
public/openapi/read/ap.yaml
Normal file
31
public/openapi/read/ap.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
get:
|
||||
tags:
|
||||
- activitypub
|
||||
summary: Fetch URL for in-app processing
|
||||
description: |
|
||||
This route accepts a URL in the `resource` query parameter, and runs some quick tests to
|
||||
determine whether that address points to an ActivityPub resource. If so, then it will try
|
||||
to process it locally and redirect the user to the local representation of it.
|
||||
|
||||
If there is no local representation available, then the user is sent off-site as originally
|
||||
expected.
|
||||
parameters:
|
||||
- in: query
|
||||
name: resource
|
||||
schema:
|
||||
type: string
|
||||
description: A URL to query for potential ActivityPub resource
|
||||
example: 'https://example.org/ap'
|
||||
responses:
|
||||
"200":
|
||||
description: Sent if the `/api` prefix is used. The `X-Redirect` header is sent with the redirection target.
|
||||
headers:
|
||||
'X-Redirect':
|
||||
schema:
|
||||
type: string
|
||||
"307":
|
||||
description: Redirect the user to the local representation or original URL.
|
||||
headers:
|
||||
Location:
|
||||
schema:
|
||||
type: string
|
||||
@@ -174,3 +174,8 @@ get:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
activitypub:
|
||||
type: object
|
||||
properties:
|
||||
probe:
|
||||
type: number
|
||||
Reference in New Issue
Block a user