//#region src/v2/blocks/request-block/helpers/is-param-disabled.ts
/**
* Determines if a parameter is disabled
*
* First we explicitly check if its been disabled via the `x-disabled` extension.
* Then we check if its an optional parameter and not a path parameter.
*
* @param param - The parameter to check.
* @param example - The example to check.
* @returns true if the parameter is disabled, false otherwise.
*/
var isParamDisabled = (param, example) => {
	const xDisabled = example?.["x-disabled"];
	if (typeof xDisabled === "boolean") return xDisabled;
	return !param.required && param.in !== "path";
};
//#endregion
export { isParamDisabled };

//# sourceMappingURL=is-param-disabled.js.map