diff --git a/src/lib/routes/admin-api/project/features.ts b/src/lib/routes/admin-api/project/features.ts index 52528a957a..4f312c8623 100644 --- a/src/lib/routes/admin-api/project/features.ts +++ b/src/lib/routes/admin-api/project/features.ts @@ -88,11 +88,11 @@ export default class ProjectFeaturesController extends Controller { method: 'get', path: PATH_ENV, permission: NONE, - handler: this.getEnvironment, + handler: this.getFeatureEnvironment, middleware: [ openApiService.validPath({ tags: ['admin'], - operationId: 'getEnvironment', + operationId: 'getFeatureEnvironment', responses: { 200: createResponseSchema('featureEnvironmentSchema'), }, @@ -103,12 +103,12 @@ export default class ProjectFeaturesController extends Controller { this.route({ method: 'post', path: `${PATH_ENV}/off`, - handler: this.toggleEnvironmentOff, + handler: this.toggleFeatureEnvironmentOff, permission: UPDATE_FEATURE_ENVIRONMENT, middleware: [ openApiService.validPath({ tags: ['admin'], - operationId: 'toggleEnvironmentOff', + operationId: 'toggleFeatureEnvironmentOff', responses: { 200: createResponseSchema('featureSchema') }, }), ], @@ -117,12 +117,12 @@ export default class ProjectFeaturesController extends Controller { this.route({ method: 'post', path: `${PATH_ENV}/on`, - handler: this.toggleEnvironmentOn, + handler: this.toggleFeatureEnvironmentOn, permission: UPDATE_FEATURE_ENVIRONMENT, middleware: [ openApiService.validPath({ tags: ['admin'], - operationId: 'toggleEnvironmentOn', + operationId: 'toggleFeatureEnvironmentOn', responses: { 200: createResponseSchema('featureSchema') }, }), ], @@ -468,7 +468,7 @@ export default class ProjectFeaturesController extends Controller { res.status(202).send(); } - async getEnvironment( + async getFeatureEnvironment( req: Request, res: Response, ): Promise { @@ -486,7 +486,7 @@ export default class ProjectFeaturesController extends Controller { ); } - async toggleEnvironmentOn( + async toggleFeatureEnvironmentOn( req: IAuthRequest, res: Response, ): Promise { @@ -501,7 +501,7 @@ export default class ProjectFeaturesController extends Controller { res.status(200).end(); } - async toggleEnvironmentOff( + async toggleFeatureEnvironmentOff( req: IAuthRequest, res: Response, ): Promise { diff --git a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap index 42a291b6df..acdad2c1f6 100644 --- a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap +++ b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap @@ -1760,7 +1760,7 @@ Object { }, "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}": Object { "get": Object { - "operationId": "getEnvironment", + "operationId": "getFeatureEnvironment", "parameters": Array [ Object { "in": "path", @@ -1806,7 +1806,7 @@ Object { }, "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/off": Object { "post": Object { - "operationId": "toggleEnvironmentOff", + "operationId": "toggleFeatureEnvironmentOff", "parameters": Array [ Object { "in": "path", @@ -1852,7 +1852,7 @@ Object { }, "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/on": Object { "post": Object { - "operationId": "toggleEnvironmentOn", + "operationId": "toggleFeatureEnvironmentOn", "parameters": Array [ Object { "in": "path",