Skip to content

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

Fix merge conflicts

Tuan Dang97b7a5ebdfde
diff --cc backend/src/controllers/v1/secretImpsController.ts
index 8e11a2c628,24e0911133..70275284be
--- a/backend/src/controllers/v1/secretImpsController.ts
+++ b/backend/src/controllers/v1/secretImpsController.ts
@@@ -16,84 -16,10 +16,84 @@@ import
ProjectPermissionActions,
ProjectPermissionSub,
getUserProjectPermissions
- } from "../../services/ProjectRoleService";
+ } from "../../ee/services/ProjectRoleService";
import { ForbiddenError, subject } from "@casl/ability";
-export const createSecretImport = async (req: Request, res: Response) => {
+export const createSecretImp = async (req: Request, res: Response) => {
+ /*
+ #swagger.summary = 'Create secret import'
+ #swagger.description = 'Create a new secret import for a specified workspace and environment'
+
+ #swagger.requestBody = {
+ content: {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of the workspace where the secret import will be created",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Environment to import to",
+ "example": "production"
+ },
+ "folderId": {
+ "type": "string",
+ "description": "Folder ID. Use root for the root folder.",
+ "example": "my_folder"
+ },
+ "secretImport": {
+ "type": "object",
+ "properties": {
+ "environment": {
+ "type": "string",
+ "description": "Import from environment",
+ "example": "development"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Import from secret path",
+ "example": "/user/oauth"
+ }
+ }
+ }
+ },
+ "required": ["workspaceId", "environment", "folderName"]
+ }
+ }
+ }
+ }
+
+ #swagger.responses[200] = {
+ content: {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "successfully created secret import"
+ }
+ },
+ "description": "Confirmation of secret import creation"
+ }
+ }
+ }
+ }
+ #swagger.responses[400] = {
+ description: "Bad Request. For example, 'Secret import already exist'"
+ }
+ #swagger.responses[401] = {
+ description: "Unauthorized request. For example, 'Folder Permission Denied'"
+ }
+ #swagger.responses[404] = {
+ description: "Resource Not Found. For example, 'Failed to find folder'"
+ }
+ */
+
const {
body: { workspaceId, environment, folderId, secretImport }
} = await validateRequest(reqValidator.CreateSecretImportV1, req);
diff --cc backend/src/index.ts
index c5ecb6fadb,0ac06fc8f9..aa4440a553
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@@ -37,8 -38,7 +38,7 @@@ import
membership as v1MembershipRouter,
organization as v1OrganizationRouter,
password as v1PasswordRouter,
- role as v1RoleRouter,
- secretImport as v1SecretImportRouter,
+ secretImps as v1SecretImpsRouter,
secret as v1SecretRouter,
secretsFolder as v1SecretsFolder,
serviceToken as v1ServiceTokenRouter,