mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
chore: mark resource limits config type fields mandatory (#6550)
## About the changes All fields should be defined in the configuration to either a user-provided value or a sensible default
This commit is contained in:
parent
1780fae022
commit
7c69500cd0
@ -4,49 +4,59 @@ export const resourceLimitsSchema = {
|
||||
$id: '#/components/schemas/resourceLimitsSchema',
|
||||
type: 'object',
|
||||
description: 'A map of resource names and their limits.',
|
||||
required: [
|
||||
'segmentValues',
|
||||
'strategySegments',
|
||||
'actionSetActions',
|
||||
'actionSetsPerProject',
|
||||
'actionSetFilters',
|
||||
'actionSetFilterValues',
|
||||
'signalEndpoints',
|
||||
'signalTokensPerEndpoint',
|
||||
],
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
segmentValues: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description: 'The maximum number of values per segment allowed.',
|
||||
},
|
||||
strategySegments: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description: 'The maximum number of strategy segments allowed.',
|
||||
},
|
||||
actionSetActions: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description:
|
||||
'The maximum number of actions per action set allowed.',
|
||||
},
|
||||
actionSetsPerProject: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description:
|
||||
'The maximum number of action set definitions per project allowed.',
|
||||
},
|
||||
actionSetFilters: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description:
|
||||
'The maximum number of filters per action set allowed.',
|
||||
},
|
||||
actionSetFilterValues: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description:
|
||||
'The maximum number of filter values inside an action set allowed.',
|
||||
},
|
||||
signalEndpoints: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description: 'The maximum number of signal endpoints allowed.',
|
||||
},
|
||||
signalTokensPerEndpoint: {
|
||||
type: 'number',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
description:
|
||||
'The maximum number of signal tokens per endpoint allowed.',
|
||||
|
@ -84,8 +84,13 @@ export const uiConfigSchema = {
|
||||
$ref: resourceLimitsSchema.$id,
|
||||
description: resourceLimitsSchema.description,
|
||||
example: {
|
||||
segmentValues: 100,
|
||||
strategySegments: 5,
|
||||
...Object.entries(resourceLimitsSchema.properties).reduce(
|
||||
(acc, [prop, { example }]) => ({
|
||||
...acc,
|
||||
[prop]: example,
|
||||
}),
|
||||
{},
|
||||
),
|
||||
},
|
||||
},
|
||||
networkViewEnabled: {
|
||||
|
Loading…
Reference in New Issue
Block a user