1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

refactor: fix duplicate operationIds (#1701)

This commit is contained in:
olav 2022-06-10 15:11:41 +02:00 committed by GitHub
parent 1264f8cb13
commit 47a719238d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -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<FeatureStrategyParams, any, any, any>,
res: Response<FeatureEnvironmentSchema>,
): Promise<void> {
@ -486,7 +486,7 @@ export default class ProjectFeaturesController extends Controller {
);
}
async toggleEnvironmentOn(
async toggleFeatureEnvironmentOn(
req: IAuthRequest<FeatureStrategyParams, any, any, any>,
res: Response<void>,
): Promise<void> {
@ -501,7 +501,7 @@ export default class ProjectFeaturesController extends Controller {
res.status(200).end();
}
async toggleEnvironmentOff(
async toggleFeatureEnvironmentOff(
req: IAuthRequest<FeatureStrategyParams, any, any, any>,
res: Response<void>,
): Promise<void> {

View File

@ -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",