import { generateValidation } from "../../../../../scripts/generate-validation.js";
function generateValidationSchemas(context) {
  const { spec, implType, outputDir } = context;
  if (!spec) {
    throw new Error("Specification is required in template context");
  }
  const config = implType.configuration || {};
  const options = {
    framework: config.framework || "zod",
    generateJsonSchema: config.generateJsonSchema !== false,
    stripUnknown: config.stripUnknown !== false,
    abortEarly: config.abortEarly || false
  };
  const result = generateValidation(spec, outputDir || "./validation", options);
  return JSON.stringify({
    message: "Validation schemas generated successfully",
    modelCount: result.modelCount,
    schemaCount: result.schemaCount,
    outputDir: result.outputDir,
    files: result.files
  }, null, 2);
}
export {
  generateValidationSchemas as default
};
