//#region src/libs/validate-parameters.ts
/**
* Validate required parameters from an example.
*
* Returns both the set of invalid parameter keys and a flag indicating
* if there are blocking errors (empty required path parameters) that
* should prevent the request from being sent.
*/
var validateParameters = (example) => {
	const result = {
		invalidParams: /* @__PURE__ */ new Set(),
		hasBlockingErrors: false
	};
	if (!example) return result;
	example.parameters?.path?.forEach((param) => {
		if (param.enabled && param.value.trim() === "") {
			result.invalidParams.add(param.key);
			result.hasBlockingErrors = true;
		}
	});
	[
		"query",
		"headers",
		"cookies"
	].forEach((paramType) => {
		example.parameters?.[paramType]?.forEach((param) => {
			if (param.required && param.value === "") result.invalidParams.add(param.key);
		});
	});
	return result;
};
//#endregion
export { validateParameters };

//# sourceMappingURL=validate-parameters.js.map