1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

fix: validate min constraint values in openapi (#4179)

This commit is contained in:
Mateusz Kwasniewski 2023-07-07 12:41:48 +02:00 committed by GitHub
parent e0f5d2c600
commit 23981407ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ export const constraintSchemaBase = {
items: {
type: 'string',
},
minItems: 1,
example: ['my-app', 'my-other-app'],
},
value: {

View File

@ -37,7 +37,7 @@ export const strategyConstraint = (): Arbitrary<ConstraintSchema> =>
operator: fc.constantFrom(...ALL_OPERATORS),
caseInsensitive: fc.boolean(),
inverted: fc.boolean(),
values: fc.array(fc.string()),
values: fc.array(fc.string(), { minLength: 1 }),
value: fc.string(),
});