Add scanner's openapi to scalar

This commit is contained in:
Zoe Roux 2025-05-04 23:26:06 +02:00
parent 4321025246
commit 9b66e7db5f
No known key found for this signature in database
3 changed files with 15 additions and 2 deletions

View File

@ -16,7 +16,8 @@ const app = new Elysia()
scalarConfig: {
sources: [
{ slug: "kyoo", url: "/swagger/json" },
{ slug: "keibi", url: "http://localhost:4568/auth/swagger/doc.json" },
{ slug: "keibi", url: "/auth/swagger/doc.json" },
{ slug: "scanner", url: "/scanner/openapi.json" },
],
},
documentation: {

View File

@ -107,6 +107,13 @@ services:
volumes:
- ./scanner:/app
- ${LIBRARY_ROOT}:/video:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.scanner.rule=PathPrefix(`/scanner/`)"
- "traefik.http.routers.scanner.middlewares=phantom-token"
- "traefik.http.middlewares.phantom-token.forwardauth.address=http://auth:4568/auth/jwt"
- "traefik.http.middlewares.phantom-token.forwardauth.authRequestHeaders=Authorization,X-Api-Key"
- "traefik.http.middlewares.phantom-token.forwardauth.authResponseHeaders=Authorization"
transcoder:
<<: *transcoder-base

View File

@ -1,6 +1,11 @@
from fastapi import FastAPI
app = FastAPI()
app = FastAPI(
title="Scanner",
description="API to control the long running scanner or interacting with external databases (themoviedb, tvdb...)\n\n"
+ "Most of those APIs are for admins only.",
openapi_prefix="/scanner",
)
@app.get("/items/{item_id}")