mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
refactor: fix duplicate operationIds (#1701)
This commit is contained in:
parent
1264f8cb13
commit
47a719238d
@ -88,11 +88,11 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
path: PATH_ENV,
|
path: PATH_ENV,
|
||||||
permission: NONE,
|
permission: NONE,
|
||||||
handler: this.getEnvironment,
|
handler: this.getFeatureEnvironment,
|
||||||
middleware: [
|
middleware: [
|
||||||
openApiService.validPath({
|
openApiService.validPath({
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
operationId: 'getEnvironment',
|
operationId: 'getFeatureEnvironment',
|
||||||
responses: {
|
responses: {
|
||||||
200: createResponseSchema('featureEnvironmentSchema'),
|
200: createResponseSchema('featureEnvironmentSchema'),
|
||||||
},
|
},
|
||||||
@ -103,12 +103,12 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: `${PATH_ENV}/off`,
|
path: `${PATH_ENV}/off`,
|
||||||
handler: this.toggleEnvironmentOff,
|
handler: this.toggleFeatureEnvironmentOff,
|
||||||
permission: UPDATE_FEATURE_ENVIRONMENT,
|
permission: UPDATE_FEATURE_ENVIRONMENT,
|
||||||
middleware: [
|
middleware: [
|
||||||
openApiService.validPath({
|
openApiService.validPath({
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
operationId: 'toggleEnvironmentOff',
|
operationId: 'toggleFeatureEnvironmentOff',
|
||||||
responses: { 200: createResponseSchema('featureSchema') },
|
responses: { 200: createResponseSchema('featureSchema') },
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -117,12 +117,12 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
this.route({
|
this.route({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: `${PATH_ENV}/on`,
|
path: `${PATH_ENV}/on`,
|
||||||
handler: this.toggleEnvironmentOn,
|
handler: this.toggleFeatureEnvironmentOn,
|
||||||
permission: UPDATE_FEATURE_ENVIRONMENT,
|
permission: UPDATE_FEATURE_ENVIRONMENT,
|
||||||
middleware: [
|
middleware: [
|
||||||
openApiService.validPath({
|
openApiService.validPath({
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
operationId: 'toggleEnvironmentOn',
|
operationId: 'toggleFeatureEnvironmentOn',
|
||||||
responses: { 200: createResponseSchema('featureSchema') },
|
responses: { 200: createResponseSchema('featureSchema') },
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -468,7 +468,7 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
res.status(202).send();
|
res.status(202).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
async getEnvironment(
|
async getFeatureEnvironment(
|
||||||
req: Request<FeatureStrategyParams, any, any, any>,
|
req: Request<FeatureStrategyParams, any, any, any>,
|
||||||
res: Response<FeatureEnvironmentSchema>,
|
res: Response<FeatureEnvironmentSchema>,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
@ -486,7 +486,7 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async toggleEnvironmentOn(
|
async toggleFeatureEnvironmentOn(
|
||||||
req: IAuthRequest<FeatureStrategyParams, any, any, any>,
|
req: IAuthRequest<FeatureStrategyParams, any, any, any>,
|
||||||
res: Response<void>,
|
res: Response<void>,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
@ -501,7 +501,7 @@ export default class ProjectFeaturesController extends Controller {
|
|||||||
res.status(200).end();
|
res.status(200).end();
|
||||||
}
|
}
|
||||||
|
|
||||||
async toggleEnvironmentOff(
|
async toggleFeatureEnvironmentOff(
|
||||||
req: IAuthRequest<FeatureStrategyParams, any, any, any>,
|
req: IAuthRequest<FeatureStrategyParams, any, any, any>,
|
||||||
res: Response<void>,
|
res: Response<void>,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
@ -1760,7 +1760,7 @@ Object {
|
|||||||
},
|
},
|
||||||
"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}": Object {
|
"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}": Object {
|
||||||
"get": Object {
|
"get": Object {
|
||||||
"operationId": "getEnvironment",
|
"operationId": "getFeatureEnvironment",
|
||||||
"parameters": Array [
|
"parameters": Array [
|
||||||
Object {
|
Object {
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@ -1806,7 +1806,7 @@ Object {
|
|||||||
},
|
},
|
||||||
"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/off": Object {
|
"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/off": Object {
|
||||||
"post": Object {
|
"post": Object {
|
||||||
"operationId": "toggleEnvironmentOff",
|
"operationId": "toggleFeatureEnvironmentOff",
|
||||||
"parameters": Array [
|
"parameters": Array [
|
||||||
Object {
|
Object {
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@ -1852,7 +1852,7 @@ Object {
|
|||||||
},
|
},
|
||||||
"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/on": Object {
|
"/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/on": Object {
|
||||||
"post": Object {
|
"post": Object {
|
||||||
"operationId": "toggleEnvironmentOn",
|
"operationId": "toggleFeatureEnvironmentOn",
|
||||||
"parameters": Array [
|
"parameters": Array [
|
||||||
Object {
|
Object {
|
||||||
"in": "path",
|
"in": "path",
|
||||||
|
Loading…
Reference in New Issue
Block a user