mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02: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',
|
$id: '#/components/schemas/resourceLimitsSchema',
|
||||||
type: 'object',
|
type: 'object',
|
||||||
description: 'A map of resource names and their limits.',
|
description: 'A map of resource names and their limits.',
|
||||||
|
required: [
|
||||||
|
'segmentValues',
|
||||||
|
'strategySegments',
|
||||||
|
'actionSetActions',
|
||||||
|
'actionSetsPerProject',
|
||||||
|
'actionSetFilters',
|
||||||
|
'actionSetFilterValues',
|
||||||
|
'signalEndpoints',
|
||||||
|
'signalTokensPerEndpoint',
|
||||||
|
],
|
||||||
additionalProperties: false,
|
additionalProperties: false,
|
||||||
properties: {
|
properties: {
|
||||||
segmentValues: {
|
segmentValues: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description: 'The maximum number of values per segment allowed.',
|
description: 'The maximum number of values per segment allowed.',
|
||||||
},
|
},
|
||||||
strategySegments: {
|
strategySegments: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description: 'The maximum number of strategy segments allowed.',
|
description: 'The maximum number of strategy segments allowed.',
|
||||||
},
|
},
|
||||||
actionSetActions: {
|
actionSetActions: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description:
|
description:
|
||||||
'The maximum number of actions per action set allowed.',
|
'The maximum number of actions per action set allowed.',
|
||||||
},
|
},
|
||||||
actionSetsPerProject: {
|
actionSetsPerProject: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description:
|
description:
|
||||||
'The maximum number of action set definitions per project allowed.',
|
'The maximum number of action set definitions per project allowed.',
|
||||||
},
|
},
|
||||||
actionSetFilters: {
|
actionSetFilters: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description:
|
description:
|
||||||
'The maximum number of filters per action set allowed.',
|
'The maximum number of filters per action set allowed.',
|
||||||
},
|
},
|
||||||
actionSetFilterValues: {
|
actionSetFilterValues: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description:
|
description:
|
||||||
'The maximum number of filter values inside an action set allowed.',
|
'The maximum number of filter values inside an action set allowed.',
|
||||||
},
|
},
|
||||||
signalEndpoints: {
|
signalEndpoints: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description: 'The maximum number of signal endpoints allowed.',
|
description: 'The maximum number of signal endpoints allowed.',
|
||||||
},
|
},
|
||||||
signalTokensPerEndpoint: {
|
signalTokensPerEndpoint: {
|
||||||
type: 'number',
|
type: 'integer',
|
||||||
example: 10,
|
example: 10,
|
||||||
description:
|
description:
|
||||||
'The maximum number of signal tokens per endpoint allowed.',
|
'The maximum number of signal tokens per endpoint allowed.',
|
||||||
|
@ -84,8 +84,13 @@ export const uiConfigSchema = {
|
|||||||
$ref: resourceLimitsSchema.$id,
|
$ref: resourceLimitsSchema.$id,
|
||||||
description: resourceLimitsSchema.description,
|
description: resourceLimitsSchema.description,
|
||||||
example: {
|
example: {
|
||||||
segmentValues: 100,
|
...Object.entries(resourceLimitsSchema.properties).reduce(
|
||||||
strategySegments: 5,
|
(acc, [prop, { example }]) => ({
|
||||||
|
...acc,
|
||||||
|
[prop]: example,
|
||||||
|
}),
|
||||||
|
{},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
networkViewEnabled: {
|
networkViewEnabled: {
|
||||||
|
Loading…
Reference in New Issue
Block a user