mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-04 13:48:56 +02:00
bug: mark descriptions on strategies as nullable (#4156)
This was omitted by mistake. Fixes 1-1086
This commit is contained in:
parent
0dec24722d
commit
46b4030d47
@ -23,6 +23,14 @@ test('strategySchema', () => {
|
|||||||
validateSchema('#/components/schemas/strategySchema', data),
|
validateSchema('#/components/schemas/strategySchema', data),
|
||||||
).toBeUndefined();
|
).toBeUndefined();
|
||||||
|
|
||||||
|
// allow null descriptions
|
||||||
|
expect(
|
||||||
|
validateSchema('#/components/schemas/strategySchema', {
|
||||||
|
...data,
|
||||||
|
description: null,
|
||||||
|
}),
|
||||||
|
).toBeUndefined();
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
validateSchema('#/components/schemas/strategySchema', {}),
|
validateSchema('#/components/schemas/strategySchema', {}),
|
||||||
).toMatchSnapshot();
|
).toMatchSnapshot();
|
||||||
|
@ -34,6 +34,7 @@ export const strategySchema = {
|
|||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
nullable: true,
|
||||||
description: 'A short description of the strategy',
|
description: 'A short description of the strategy',
|
||||||
example: 'Gradual rollout to logged in users',
|
example: 'Gradual rollout to logged in users',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user