mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: Application fields should be optional.
This commit is contained in:
parent
9ee7a715c2
commit
9c32a28597
@ -2,6 +2,7 @@
|
||||
|
||||
## 3.2.10
|
||||
|
||||
- fix: Strategies should not be required for updateding application details
|
||||
- feat: boolean strategy paramters
|
||||
|
||||
## 3.2.9
|
||||
|
@ -11,12 +11,24 @@ const applicationSchema = joi
|
||||
sdkVersion: joi.string().optional(),
|
||||
strategies: joi
|
||||
.array()
|
||||
.required()
|
||||
.optional()
|
||||
.items(joi.string(), joi.any().strip()),
|
||||
description: joi.string().optional(),
|
||||
url: joi.string().optional(),
|
||||
color: joi.string().optional(),
|
||||
icon: joi.string().optional(),
|
||||
description: joi
|
||||
.string()
|
||||
.allow('')
|
||||
.optional(),
|
||||
url: joi
|
||||
.string()
|
||||
.allow('')
|
||||
.optional(),
|
||||
color: joi
|
||||
.string()
|
||||
.allow('')
|
||||
.optional(),
|
||||
icon: joi
|
||||
.string()
|
||||
.allow('')
|
||||
.optional(),
|
||||
});
|
||||
|
||||
module.exports = applicationSchema;
|
||||
|
@ -142,3 +142,15 @@ test('should store application', t => {
|
||||
.send({ appName, strategies: ['default'] })
|
||||
.expect(202);
|
||||
});
|
||||
|
||||
test('should store application details wihtout strategies', t => {
|
||||
t.plan(0);
|
||||
const { request, perms } = getSetup();
|
||||
const appName = '123!23';
|
||||
perms.withPermissions(UPDATE_APPLICATION);
|
||||
|
||||
return request
|
||||
.post(`/api/admin/metrics/applications/${appName}`)
|
||||
.send({ appName, url: 'htto://asd.com' })
|
||||
.expect(202);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user