Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 17 additions & 12 deletions src/api/openapi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
export const openapi = {
openapi: "3.0.3",
info: { title: "CronOps Web API", version: "1.0.0" },
info: {
title: "CronOps Web API",
version: "1.0.0",
description:
"REST API for CronOps - A lightweight, cron-based file management and system task scheduler for containerized environments. Automate file operations, execute commands, and manage scheduled jobs.",
contact: {
name: "CronOps",
url: "https://github.com/mtakla/cronops",
},
license: {
name: "ISC",
url: "https://github.com/mtakla/cronops/blob/main/LICENSE",
},
},
components: {
securitySchemes: {
ApiKeyBearer: {
Expand All @@ -13,23 +26,15 @@ export const openapi = {
tags: [
{
name: "public",
description: "Public api",
description: "Public endpoints - Health check and API documentation",
},
{
name: "jobs",
description: "CronOps job related tasks",
description: "Job management - Trigger, pause, and resume CronOps scheduled jobs",
},
{
name: "admin",
description: "CronOps admin tasks",
},
{
name: "user",
description: "Operations about user",
externalDocs: {
description: "Find out more about our store",
url: "http://swagger.io",
},
description: "Administration endpoints - Manage CronOps service configuration and operations",
},
],
paths: {
Expand Down
21 changes: 19 additions & 2 deletions src/api/webapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,27 @@ app.addHook("preHandler", async (request, reply) => {
app.get("/docs", async (_, reply) => {
reply.type("text/html").send(`
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>CronOps API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="CronOps API documentation - Lightweight, cron-based file management and system task scheduler for containerized environments. Automate copying, moving, archiving, and cleaning up files." />
<meta name="keywords" content="cronops, cron, scheduler, file management, docker, containerization, automation, API, REST API" />
<meta name="author" content="nevereven" />
<meta name="theme-color" content="#1976d2" />

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:title" content="CronOps API Documentation" />
<meta property="og:description" content="Interactive API documentation for CronOps - Cron-based file management and system task scheduler for containerized environments." />
<meta property="og:site_name" content="CronOps" />

<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="CronOps API Documentation" />
<meta name="twitter:description" content="Interactive API documentation for CronOps - Cron-based file management and system task scheduler for containerized environments." />

<title>CronOps API Documentation</title>
<script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
</head>
<body>
Expand Down