//#region src/v2/features/operation/helpers/get-security-requirements.ts
/**
* Compute what the security requirements should be for a request
*
* If an operation has only one optional security requirement,
* use the document security and ensure it includes an optional object.
*
* Otherwise we generally go operation -> document security.
*/
var getSecurityRequirements = (documentSecurity, operationSecurity) => {
	if (JSON.stringify(operationSecurity) === "[{}]" && documentSecurity?.length) return Boolean(documentSecurity.find((s) => JSON.stringify(s) === "{}")) ? documentSecurity : [...documentSecurity, {}];
	return operationSecurity ?? documentSecurity ?? [];
};
//#endregion
export { getSecurityRequirements };

//# sourceMappingURL=get-security-requirements.js.map