Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.
This commit is contained in:
20
node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
generated
vendored
Normal file
20
node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { parseDef } from "../parseDef.js";
|
||||
export const parseOptionalDef = (def, refs) => {
|
||||
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
||||
return parseDef(def.innerType._def, refs);
|
||||
}
|
||||
const innerSchema = parseDef(def.innerType._def, {
|
||||
...refs,
|
||||
currentPath: [...refs.currentPath, "anyOf", "1"],
|
||||
});
|
||||
return innerSchema
|
||||
? {
|
||||
anyOf: [
|
||||
{
|
||||
not: {},
|
||||
},
|
||||
innerSchema,
|
||||
],
|
||||
}
|
||||
: {};
|
||||
};
|
Reference in New Issue
Block a user