boring.tools-poc/packages/schema/src/page/public.ts
Lars Hampe 7f6a0f36e9
Some checks failed
Build and Push Docker Image / tests (push) Successful in 1m9s
Build and Push Docker Image / build (push) Failing after 1m15s
feat(api): add page tests
2024-11-12 18:51:30 +01:00

36 lines
699 B
TypeScript

import { z } from '@hono/zod-openapi'
export const PagePublicOutput = z.object({
title: z.string(),
description: z.string().nullable(),
icon: z.string(),
changelogs: z
.array(
z.object({
title: z.string(),
description: z.string(),
versions: z.array(
z.object({
markdown: z.string(),
version: z.string(),
releasedAt: z.date(),
}),
),
}),
)
.optional(),
})
export const PagePublicParams = z.object({
id: z
.string()
.uuid()
.openapi({
param: {
name: 'id',
in: 'path',
},
example: 'a5ed5965-0506-44e6-aaec-0465ff9fe092',
}),
})