mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
56 lines
1.2 KiB
JavaScript
56 lines
1.2 KiB
JavaScript
const swaggerAutogen = require('swagger-autogen')();
|
|
|
|
const outputFile = './swagger.json';
|
|
const endpointsFiles = ['./server.js'];
|
|
const config = {
|
|
info: {
|
|
title: 'Jellystat API Documentation',
|
|
description: '',
|
|
},
|
|
tags: [
|
|
{
|
|
name: 'API',
|
|
description: 'Jellystat API Endpoints',
|
|
},
|
|
{
|
|
name: 'Auth',
|
|
description: 'Jellystat Auth Endpoints',
|
|
},
|
|
{
|
|
name: 'Proxy',
|
|
description: 'Jellyfin Proxied Endpoints',
|
|
},
|
|
{
|
|
name: 'Stats',
|
|
description: 'Jellystat Statisitc Endpoints',
|
|
},
|
|
{
|
|
name: 'Backup',
|
|
description: 'Jellystat Backup/Restore Endpoints',
|
|
},
|
|
{
|
|
name: 'Logs',
|
|
description: 'Jellystat Log Endpoints',
|
|
},
|
|
],
|
|
host: '',
|
|
schemes: ['http', 'https'],
|
|
securityDefinitions: {
|
|
apiKey: {
|
|
type: 'apiKey',
|
|
name: 'x-api-token',
|
|
in: 'header',
|
|
},
|
|
},
|
|
security: [
|
|
{
|
|
apiKey: [],
|
|
},
|
|
],
|
|
};
|
|
|
|
module.exports = config;
|
|
|
|
|
|
swaggerAutogen(outputFile, endpointsFiles, config);
|