Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: api validation

IgorHorta878c761614d7
diff --git a/backend/src/ee/services/permission/org-permission.ts b/backend/src/ee/services/permission/org-permission.ts
index 2538057e6a..40bfd2757b 100644
--- a/backend/src/ee/services/permission/org-permission.ts
+++ b/backend/src/ee/services/permission/org-permission.ts
@@ -197,9 +197,12 @@ export const OrgPermissionSchema = z.discriminatedUnion("subject", [
}),
z.object({
subject: z.literal(OrgPermissionSubjects.SubOrganization).describe("The entity this permission pertains to."),
- action: CASL_ACTION_SCHEMA_NATIVE_ENUM(OrgPermissionSubOrgActions).describe(
- "Describe what action an entity can take."
- )
+ // Use CASL_ACTION_SCHEMA_ENUM so OpenAPI anyOf structure matches reference (string enum + array), avoiding oasdiff breaking change
+ action: CASL_ACTION_SCHEMA_ENUM([
+ OrgPermissionSubOrgActions.Create,
+ OrgPermissionSubOrgActions.DirectAccess,
+ OrgPermissionSubOrgActions.LinkRootGroup
+ ]).describe("Describe what action an entity can take.")
}),
z.object({
subject: z.literal(OrgPermissionSubjects.Member).describe("The entity this permission pertains to."),