/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 056fe2c05c86
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const JsonSchema$inboundSchema = z
    .object({
    name: z.string(),
    description: z.nullable(z.string()).optional(),
    schema: z.record(z.string(), z.any()),
    strict: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        "schema": "schemaDefinition",
    });
});
/** @internal */
export const JsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.nullable(z.string()).optional(),
    schemaDefinition: z.record(z.string(), z.any()),
    strict: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        schemaDefinition: "schema",
    });
});
export function jsonSchemaToJSON(jsonSchema) {
    return JSON.stringify(JsonSchema$outboundSchema.parse(jsonSchema));
}
export function jsonSchemaFromJSON(jsonString) {
    return safeParse(jsonString, (x) => JsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JsonSchema' from JSON`);
}
//# sourceMappingURL=jsonschema.js.map