Skip to content

Commit 1704716

Browse files
committed
fix(failover): nullability of failureCondition
(cherry picked from commit ba78e16)
1 parent 4ad3287 commit 1704716

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

gravitee-apim-console-webui/src/management/api/failover-v4/api-failover-v4.component.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ describe('ApiV4FailoverComponent', () => {
6969
it('should enable and set failover config', async () => {
7070
const api = fakeApiV4({
7171
id: API_ID,
72-
failover: undefined,
7372
});
7473
expectApiGetRequest(api);
7574
const saveBar = await loader.getHarness(GioSaveBarHarness);
@@ -127,7 +126,7 @@ describe('ApiV4FailoverComponent', () => {
127126
enabled: true,
128127
forceNextEndpointOnFailure: false,
129128
maxRetries: 2,
130-
failureCondition: undefined,
129+
failureCondition: '',
131130
slowCallDuration: 200,
132131
openStateDuration: 2000,
133132
maxFailures: 2,
@@ -221,7 +220,7 @@ describe('ApiV4FailoverComponent', () => {
221220
enabled: true,
222221
forceNextEndpointOnFailure: false,
223222
maxRetries: 3,
224-
failureCondition: undefined,
223+
failureCondition: '',
225224
slowCallDuration: 300,
226225
openStateDuration: 3000,
227226
maxFailures: 3,

gravitee-apim-console-webui/src/management/api/failover-v4/api-failover-v4.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export class ApiFailoverV4Component implements OnInit, OnDestroy {
198198
enabled,
199199
forceNextEndpointOnFailure,
200200
maxRetries,
201-
failureCondition: failureCondition || undefined,
201+
failureCondition,
202202
slowCallDuration,
203203
openStateDuration,
204204
maxFailures,

gravitee-apim-rest-api/gravitee-apim-rest-api-automation/gravitee-apim-rest-api-automation-rest/src/main/resources/open-api.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,6 @@ components:
21632163
default: true
21642164
failureCondition:
21652165
type: string
2166-
nullable: true
21672166
description: An EL expression evaluated on the response to determine if it should be considered a failure (e.g. "{#response.status >= 500}"). If null, response content is not evaluated.
21682167
forceNextEndpointOnFailure:
21692168
type: boolean

gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/main/resources/openapi/openapi-apis.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7599,7 +7599,6 @@ components:
75997599
default: true
76007600
failureCondition:
76017601
type: string
7602-
nullable: true
76037602
description: An EL expression evaluated on the response to determine if it should be considered a failure (e.g. "{#response.status >= 500}"). If null, response content is not evaluated.
76047603
forceNextEndpointOnFailure:
76057604
type: boolean

0 commit comments

Comments
 (0)