1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

bug: mark descriptions on strategies as nullable (#4156)

This was omitted by mistake.

Fixes 1-1086
This commit is contained in:
Thomas Heartman 2023-07-06 13:39:23 +02:00 committed by GitHub
parent 0dec24722d
commit 46b4030d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,14 @@ test('strategySchema', () => {
validateSchema('#/components/schemas/strategySchema', data),
).toBeUndefined();
// allow null descriptions
expect(
validateSchema('#/components/schemas/strategySchema', {
...data,
description: null,
}),
).toBeUndefined();
expect(
validateSchema('#/components/schemas/strategySchema', {}),
).toMatchSnapshot();

View File

@ -34,6 +34,7 @@ export const strategySchema = {
},
description: {
type: 'string',
nullable: true,
description: 'A short description of the strategy',
example: 'Gradual rollout to logged in users',
},