@mintlify/validation
Advanced tools
Comparing version 0.1.263 to 0.1.264
import { zodToJsonSchema } from 'zod-to-json-schema'; | ||
import { mintConfigSchema } from './mint-config/schemas/v1/config.js'; | ||
import { docsConfigSchema } from './mint-config/schemas/v2/index.js'; | ||
import { baseLanguageSchema, languagesSchema, pageSchema, } from './mint-config/schemas/v2/properties/index.js'; | ||
import { anchorsSchema, baseAnchorSchema, } from './mint-config/schemas/v2/properties/navigation/anchors.js'; | ||
import { baseDropdownSchema, dropdownsSchema, } from './mint-config/schemas/v2/properties/navigation/dropdown.js'; | ||
import { groupSchema, groupsSchema, } from './mint-config/schemas/v2/properties/navigation/groups.js'; | ||
import { navigationSchema } from './mint-config/schemas/v2/properties/navigation/index.js'; | ||
import { pagesSchema, pageOrGroupSchema, } from './mint-config/schemas/v2/properties/navigation/pages.js'; | ||
import { baseTabSchema, tabsSchema } from './mint-config/schemas/v2/properties/navigation/tabs.js'; | ||
import { baseVersionSchema, versionsSchema, } from './mint-config/schemas/v2/properties/navigation/version.js'; | ||
import { openApiSchema } from './mint-config/schemas/v2/properties/reusable/openapi.js'; | ||
export * from './openapi/types/endpoint.js'; | ||
@@ -15,3 +24,23 @@ export * from './openapi/OpenApiToEndpointConverter.js'; | ||
export const mintConfigJsonSchema = zodToJsonSchema(mintConfigSchema, 'Schema'); | ||
export const docsConfigJsonSchema = zodToJsonSchema(docsConfigSchema, 'Schema'); | ||
export const docsConfigJsonSchema = zodToJsonSchema(docsConfigSchema, { | ||
definitions: { | ||
languagesSchema, | ||
versionsSchema, | ||
tabsSchema, | ||
dropdownsSchema, | ||
anchorsSchema, | ||
groupsSchema, | ||
pagesSchema, | ||
openApiSchema, | ||
pageOrGroupSchema, | ||
navigationSchema, | ||
baseLanguageSchema, | ||
baseVersionSchema, | ||
baseTabSchema, | ||
baseDropdownSchema, | ||
baseAnchorSchema, | ||
groupSchema, | ||
pageSchema, | ||
}, | ||
}); | ||
export * from './mint-config/schemas/v2/properties/index.js'; |
import { zodToJsonSchema } from 'zod-to-json-schema'; | ||
import { mintConfigSchema } from './mint-config/schemas/v1/config.js'; | ||
import { docsConfigSchema } from './mint-config/schemas/v2/index.js'; | ||
import { baseLanguageSchema, languagesSchema, pageSchema, } from './mint-config/schemas/v2/properties/index.js'; | ||
import { anchorsSchema, baseAnchorSchema, } from './mint-config/schemas/v2/properties/navigation/anchors.js'; | ||
import { baseDropdownSchema, dropdownsSchema, } from './mint-config/schemas/v2/properties/navigation/dropdown.js'; | ||
import { groupSchema, groupsSchema, } from './mint-config/schemas/v2/properties/navigation/groups.js'; | ||
import { navigationSchema } from './mint-config/schemas/v2/properties/navigation/index.js'; | ||
import { pagesSchema, pageOrGroupSchema, } from './mint-config/schemas/v2/properties/navigation/pages.js'; | ||
import { baseTabSchema, tabsSchema } from './mint-config/schemas/v2/properties/navigation/tabs.js'; | ||
import { baseVersionSchema, versionsSchema, } from './mint-config/schemas/v2/properties/navigation/version.js'; | ||
import { openApiSchema } from './mint-config/schemas/v2/properties/reusable/openapi.js'; | ||
export * from './openapi/types/endpoint.js'; | ||
@@ -15,3 +24,23 @@ export * from './openapi/OpenApiToEndpointConverter.js'; | ||
export const mintConfigJsonSchema = zodToJsonSchema(mintConfigSchema, 'Schema'); | ||
export const docsConfigJsonSchema = zodToJsonSchema(docsConfigSchema, 'Schema'); | ||
export const docsConfigJsonSchema = zodToJsonSchema(docsConfigSchema, { | ||
definitions: { | ||
languagesSchema, | ||
versionsSchema, | ||
tabsSchema, | ||
dropdownsSchema, | ||
anchorsSchema, | ||
groupsSchema, | ||
pagesSchema, | ||
openApiSchema, | ||
pageOrGroupSchema, | ||
navigationSchema, | ||
baseLanguageSchema, | ||
baseVersionSchema, | ||
baseTabSchema, | ||
baseDropdownSchema, | ||
baseAnchorSchema, | ||
groupSchema, | ||
pageSchema, | ||
}, | ||
}); | ||
export * from './mint-config/schemas/v2/properties/index.js'; |
import { z } from 'zod'; | ||
import { AnchorNavigation } from './divisionNav.js'; | ||
declare const baseAnchorSchema: z.ZodObject<{ | ||
export declare const baseAnchorSchema: z.ZodObject<{ | ||
anchor: z.ZodString; | ||
@@ -110,2 +110,1 @@ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ | ||
export type DecoratedAnchorsConfig = z.infer<typeof decoratedAnchorsSchema>; | ||
export {}; |
@@ -13,3 +13,3 @@ import { z } from 'zod'; | ||
import { decoratedVersionsSchema, versionsSchema } from './version.js'; | ||
const baseAnchorSchema = z.object({ | ||
export const baseAnchorSchema = z.object({ | ||
anchor: z.string().nonempty().describe('The name of the anchor'), | ||
@@ -43,5 +43,8 @@ icon: iconSchema.optional(), | ||
export const nonRecursiveAnchorSchema = baseAnchorSchema.and(z.object({ href: hrefSchema })); | ||
export const anchorsSchema = z.array(anchorSchema).describe('Organizing by anchors'); | ||
export const anchorsSchema = z | ||
.array(anchorSchema) | ||
.min(1, 'At least one anchor must be specified') | ||
.describe('Organizing by anchors'); | ||
export const decoratedAnchorsSchema = z | ||
.array(decoratedAnchorSchema) | ||
.describe('Organizing by anchors'); |
import { z } from 'zod'; | ||
import { DropdownNavigation } from './divisionNav.js'; | ||
declare const baseDropdownSchema: z.ZodObject<{ | ||
export declare const baseDropdownSchema: z.ZodObject<{ | ||
dropdown: z.ZodString; | ||
@@ -74,2 +74,1 @@ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ | ||
export type DecoratedDropdownsConfig = z.infer<typeof decoratedDropdownsSchema>; | ||
export {}; |
@@ -12,3 +12,3 @@ import { z } from 'zod'; | ||
import { decoratedVersionsSchema, versionsSchema } from './version.js'; | ||
const baseDropdownSchema = z.object({ | ||
export const baseDropdownSchema = z.object({ | ||
dropdown: z.string().nonempty().describe('The name of the dropdown'), | ||
@@ -44,2 +44,3 @@ icon: iconSchema.optional(), | ||
.array(decoratedDropdownSchema) | ||
.min(1, 'At least one dropdown must be specified') | ||
.describe('Organizing by dropdowns'); |
@@ -25,3 +25,9 @@ import { z } from 'zod'; | ||
.describe('Organizing by groups'); | ||
export const groupsSchema = z.array(groupSchema); | ||
export const decoratedGroupsSchema = z.array(decoratedGroupSchema); | ||
export const groupsSchema = z | ||
.array(groupSchema) | ||
.min(1, 'At least one group must be specified') | ||
.describe('Organizing by groups'); | ||
export const decoratedGroupsSchema = z | ||
.array(decoratedGroupSchema) | ||
.min(1, 'At least one group must be specified') | ||
.describe('Organizing by groups'); |
import { z } from 'zod'; | ||
import { LanguageNavigation } from './divisionNav.js'; | ||
declare const baseLanguageSchema: z.ZodObject<{ | ||
export declare const baseLanguageSchema: z.ZodObject<{ | ||
language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>; | ||
@@ -38,2 +38,1 @@ hidden: z.ZodOptional<z.ZodBoolean>; | ||
export type DecoratedLanguageConfig = z.infer<typeof decoratedLanguageSchema>; | ||
export {}; |
@@ -11,3 +11,3 @@ import { z } from 'zod'; | ||
import { decoratedVersionsSchema, versionsSchema } from './version.js'; | ||
const baseLanguageSchema = z.object({ | ||
export const baseLanguageSchema = z.object({ | ||
language: z | ||
@@ -14,0 +14,0 @@ .enum(['en', 'cn', 'es', 'fr', 'jp', 'pt', 'pt-BR', 'de']) |
import { z } from 'zod'; | ||
import { TabNavigation } from './divisionNav.js'; | ||
declare const baseTabSchema: z.ZodObject<{ | ||
export declare const baseTabSchema: z.ZodObject<{ | ||
tab: z.ZodString; | ||
@@ -74,2 +74,1 @@ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ | ||
export type DecoratedTabConfig = z.infer<typeof decoratedTabSchema>; | ||
export {}; |
@@ -12,3 +12,3 @@ import { z } from 'zod'; | ||
import { decoratedVersionsSchema, versionsSchema } from './version.js'; | ||
const baseTabSchema = z.object({ | ||
export const baseTabSchema = z.object({ | ||
tab: z.string().nonempty().describe('The name of the tab'), | ||
@@ -41,3 +41,9 @@ icon: iconSchema.optional(), | ||
export const nonRecursiveTabSchema = baseTabSchema.and(z.object({ href: hrefSchema })); | ||
export const tabsSchema = z.array(tabSchema).describe('Organizing by tabs'); | ||
export const decoratedTabsSchema = z.array(decoratedTabSchema).describe('Organizing by tabs'); | ||
export const tabsSchema = z | ||
.array(tabSchema) | ||
.min(1, 'At least one tab must be specified') | ||
.describe('Organizing by tabs'); | ||
export const decoratedTabsSchema = z | ||
.array(decoratedTabSchema) | ||
.min(1, 'At least one tab must be specified') | ||
.describe('Organizing by tabs'); |
import { z } from 'zod'; | ||
import { VersionNavigation } from './divisionNav.js'; | ||
declare const baseVersionSchema: z.ZodObject<{ | ||
export declare const baseVersionSchema: z.ZodObject<{ | ||
version: z.ZodString; | ||
@@ -38,2 +38,1 @@ hidden: z.ZodOptional<z.ZodBoolean>; | ||
export type DecoratedVersionsConfig = z.infer<typeof decoratedVersionsSchema>; | ||
export {}; |
@@ -11,3 +11,3 @@ import { z } from 'zod'; | ||
import { decoratedTabsSchema, tabsSchema } from './tabs.js'; | ||
const baseVersionSchema = z.object({ | ||
export const baseVersionSchema = z.object({ | ||
version: z.string().nonempty().describe('The name of the version'), | ||
@@ -39,5 +39,9 @@ hidden: hiddenSchema.optional(), | ||
export const nonRecursiveVersionSchema = baseVersionSchema.and(z.object({ href: hrefSchema })); | ||
export const versionsSchema = z.array(versionSchema).describe('Organizing by versions'); | ||
export const versionsSchema = z | ||
.array(versionSchema) | ||
.min(1, 'At least one version must be specified') | ||
.describe('Organizing by versions'); | ||
export const decoratedVersionsSchema = z | ||
.array(decoratedVersionSchema) | ||
.min(1, 'At least one version must be specified') | ||
.describe('Organizing by versions'); |
{ | ||
"name": "@mintlify/validation", | ||
"version": "0.1.263", | ||
"version": "0.1.264", | ||
"description": "Validates mint.json files", | ||
@@ -63,3 +63,3 @@ "author": "Mintlify, Inc.", | ||
}, | ||
"gitHead": "9ccabce6d9ff2299f8867c9e00e1a66af67e8586" | ||
"gitHead": "11ab6c4a761ccde38d1fdb66ad6d2b30806c637d" | ||
} |
Sorry, the diff of this file is not supported yet
1347365
32589