Skip to content

Commit

Permalink
fix: Add $schema to schema.json
Browse files Browse the repository at this point in the history
  • Loading branch information
exaby73 committed Oct 18, 2024
1 parent ccd47c4 commit 0b04545
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export type { Sidebar } from "./models/sidebar";

export const ConfigSchema = z
.object({
// The URL of the schema file
$schema: z.string().url().optional().catch(undefined),
// The name of the project
name: z.string().min(1).optional().catch(undefined),
// The description of the project
Expand Down Expand Up @@ -54,6 +56,7 @@ export const ConfigSchema = z
sidebar,
})
.transform((config) => {
if (config.$schema) delete config.$schema;
return {
...config,
// Extract locales from the sidebar configuration
Expand Down
Binary file modified bun.lockb
Binary file not shown.

0 comments on commit 0b04545

Please sign in to comment.