mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 10:06:52 +02:00
feat(openapi): refactor into indiv. files to match API & tpl routing
This commit is contained in:
19
public/openapi/api/topic/pagination.yaml
Normal file
19
public/openapi/api/topic/pagination.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
get:
|
||||
tags:
|
||||
- topics
|
||||
summary: Get topic pagination data
|
||||
description: This route retrieves pagination data for a given topic. It is used mainly client-side, as it return data necessary to update a pagination block client-side.
|
||||
parameters:
|
||||
- name: topic_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 1
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../components/schemas/Pagination.yaml#/Pagination
|
||||
18
public/openapi/api/topic/teaser.yaml
Normal file
18
public/openapi/api/topic/teaser.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
get:
|
||||
tags:
|
||||
- topics
|
||||
summary: Get a topic's teaser post
|
||||
parameters:
|
||||
- name: topic_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 1
|
||||
responses:
|
||||
"200":
|
||||
description: "A JSON object containing the teaser post for a topic"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../../components/schemas/PostsObject.yaml#/PostsObject
|
||||
35
public/openapi/api/topic/thumb/upload.yaml
Normal file
35
public/openapi/api/topic/thumb/upload.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
post:
|
||||
tags:
|
||||
- topics
|
||||
summary: Upload topic thumb
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
files:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
format: binary
|
||||
required:
|
||||
- files
|
||||
responses:
|
||||
"200":
|
||||
description: "Image uploaded"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The filename
|
||||
url:
|
||||
type: string
|
||||
description: URL of the uploaded image for use client-side
|
||||
path:
|
||||
type: string
|
||||
description: Path to the file in the local file system
|
||||
62
public/openapi/api/topic/tid.yaml
Normal file
62
public/openapi/api/topic/tid.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
get:
|
||||
tags:
|
||||
- shorthand
|
||||
summary: Get topic data
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 1
|
||||
responses:
|
||||
"200":
|
||||
description: "A JSON object containing topic data"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
tid:
|
||||
type: number
|
||||
uid:
|
||||
type: number
|
||||
cid:
|
||||
type: number
|
||||
mainPid:
|
||||
type: number
|
||||
teaserPid:
|
||||
type: number
|
||||
nullable: true
|
||||
title:
|
||||
type: string
|
||||
slug:
|
||||
type: string
|
||||
timestamp:
|
||||
type: number
|
||||
lastposttime:
|
||||
type: number
|
||||
postcount:
|
||||
type: number
|
||||
viewcount:
|
||||
type: number
|
||||
deleted:
|
||||
type: number
|
||||
locked:
|
||||
type: number
|
||||
pinned:
|
||||
type: number
|
||||
upvotes:
|
||||
type: number
|
||||
downvotes:
|
||||
type: number
|
||||
deleterUid:
|
||||
type: number
|
||||
titleRaw:
|
||||
type: string
|
||||
timestampISO:
|
||||
type: string
|
||||
lastposttimeISO:
|
||||
type: string
|
||||
votes:
|
||||
type: number
|
||||
Reference in New Issue
Block a user