mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Revert "fix: prevent non-string properties from being passed as context values" (#6702)
Reverts Unleash/unleash#6676
This commit is contained in:
parent
6762703db9
commit
ab82543f54
@ -25,33 +25,3 @@ test('sdkContextSchema', () =>
|
||||
validateSchema(sdkContextSchema.$id, data) === undefined,
|
||||
),
|
||||
));
|
||||
|
||||
test('using objects as values (outside of the `properties` property) is invalid', () => {
|
||||
const inputs = [
|
||||
{
|
||||
appName: 'test',
|
||||
array: [],
|
||||
},
|
||||
{
|
||||
appName: 'test',
|
||||
object: {},
|
||||
},
|
||||
{
|
||||
appName: 'test',
|
||||
properties: {
|
||||
array: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
appName: 'test',
|
||||
properties: {
|
||||
object: {},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const validationResults = inputs.map((input) =>
|
||||
validateSchema(sdkContextSchema.$id, input),
|
||||
);
|
||||
expect(validationResults.every((error) => error !== undefined)).toBe(true);
|
||||
});
|
||||
|
@ -5,9 +5,7 @@ export const sdkContextSchema = {
|
||||
description: 'The Unleash context as modeled in client SDKs',
|
||||
type: 'object',
|
||||
required: ['appName'],
|
||||
additionalProperties: {
|
||||
type: 'string',
|
||||
},
|
||||
additionalProperties: true,
|
||||
properties: {
|
||||
appName: {
|
||||
type: 'string',
|
||||
|
Loading…
Reference in New Issue
Block a user