oas: [2/2] improve store OAS (#9035)

This commit is contained in:
Shahed Nasser
2024-09-06 18:52:38 +03:00
committed by GitHub
parent b5dbf572e3
commit cd909f9db3
17 changed files with 178 additions and 110 deletions
@@ -69,7 +69,7 @@ class OasKindGenerator extends FunctionKindGenerator {
requiresAuthentication: true,
},
{
startsWith: "store/customers/me",
startsWith: "store/customers",
requiresAuthentication: true,
},
]
@@ -779,7 +779,9 @@ class OasKindGenerator extends FunctionKindGenerator {
oasPath.startsWith("admin")
const isStoreAuthenticated = hasAuthenticationOverride
? oasPath.startsWith("store")
: !isAuthenticationDisabled && oasPath.startsWith("store")
: !isAuthenticationDisabled &&
hasAuthenticationOverride &&
oasPath.startsWith("store")
const isAuthenticated =
isAdminAuthenticated || isStoreAuthenticated || hasAuthenticationOverride