mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 13:19:16 +02:00
feat(api): ✨ Add OpenAPI visualizer
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 53s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 5s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Nix Build / check (push) Failing after 5s
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 53s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 5s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Nix Build / check (push) Failing after 5s
This commit is contained in:
parent
65e2e19ff1
commit
c674a1309c
32 changed files with 772 additions and 732 deletions
|
|
@ -1,31 +1,33 @@
|
|||
import { z } from "@hono/zod-openapi";
|
||||
import { Account } from "./account.ts";
|
||||
|
||||
export const PreviewCardAuthor = z.object({
|
||||
name: z.string().openapi({
|
||||
description: "The original resource author’s name.",
|
||||
example: "The Doubleclicks",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/PreviewCardAuthor/#name",
|
||||
},
|
||||
}),
|
||||
url: z
|
||||
.string()
|
||||
.url()
|
||||
.openapi({
|
||||
description: "A link to the author of the original resource.",
|
||||
example: "https://www.youtube.com/user/thedoubleclicks",
|
||||
export const PreviewCardAuthor = z
|
||||
.object({
|
||||
name: z.string().openapi({
|
||||
description: "The original resource author’s name.",
|
||||
example: "The Doubleclicks",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/PreviewCardAuthor/#url",
|
||||
url: "https://docs.joinmastodon.org/entities/PreviewCardAuthor/#name",
|
||||
},
|
||||
}),
|
||||
account: Account.nullable().openapi({
|
||||
description: "The fediverse account of the author.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/PreviewCardAuthor/#account",
|
||||
},
|
||||
}),
|
||||
});
|
||||
url: z
|
||||
.string()
|
||||
.url()
|
||||
.openapi({
|
||||
description: "A link to the author of the original resource.",
|
||||
example: "https://www.youtube.com/user/thedoubleclicks",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/PreviewCardAuthor/#url",
|
||||
},
|
||||
}),
|
||||
account: Account.nullable().openapi({
|
||||
description: "The fediverse account of the author.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/PreviewCardAuthor/#account",
|
||||
},
|
||||
}),
|
||||
})
|
||||
.openapi("PreviewCardAuthor");
|
||||
|
||||
export const PreviewCard = z
|
||||
.object({
|
||||
|
|
@ -150,7 +152,7 @@ export const PreviewCard = z
|
|||
},
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
.openapi("PreviewCard", {
|
||||
description:
|
||||
"Represents a rich preview card that is generated using OpenGraph tags from a URL.",
|
||||
externalDocs: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue