feat(openapi): refactor into indiv. files to match API & tpl routing

This commit is contained in:
psychobunny
2020-09-29 11:49:17 -04:00
parent 9c5b690799
commit 84f5e4cf3d
119 changed files with 7934 additions and 8224 deletions

View 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

View 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

View 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

View 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