68 lignes
1,4 Kio
YAML
68 lignes
1,4 Kio
YAML
---
|
|
openapi: '3.0.0'
|
|
|
|
info:
|
|
version: 6.0.0
|
|
title: Mangadex API
|
|
description: 'The API powering the MangaDex service.'
|
|
license:
|
|
name: BSD 3-Clause
|
|
|
|
servers:
|
|
- url: http://localhost:3000
|
|
|
|
schemes:
|
|
- 'http'
|
|
|
|
tags:
|
|
- name: health
|
|
description: 'Service health endpoints'
|
|
- name: users
|
|
description: 'Service user endpoints'
|
|
|
|
paths:
|
|
/-/healthy:
|
|
get:
|
|
summary: Performs a quick healthcheck on the API server.
|
|
operationId: healthcheck
|
|
tags:
|
|
- health
|
|
responses:
|
|
'200':
|
|
description: 'Everything is healthy.'
|
|
/-/metrics:
|
|
get:
|
|
summary: Retrieves some metrics about the API server and database.
|
|
operationId: metrics
|
|
tags:
|
|
- health
|
|
responses:
|
|
'200':
|
|
description: 'A Prometheus-compatible metrics list.'
|
|
|
|
/users:
|
|
get:
|
|
summary: Retrieves every user in the database.
|
|
operationId: getAllUsers
|
|
tags:
|
|
- users
|
|
responses:
|
|
'200':
|
|
description: 'All users in the database.'
|
|
|
|
/users/{username}:
|
|
get:
|
|
summary: Retrieves a single user from the database.
|
|
operationId: getOneUser
|
|
tags:
|
|
- users
|
|
parameters:
|
|
- in: path
|
|
name: username
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: The username of the user you want information on.
|
|
responses:
|
|
'200':
|
|
description: 'A single user from the database.'
|