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

test: meta schema rules should not check description on ref (#3980)

This commit is contained in:
Mateusz Kwasniewski 2023-06-14 12:29:09 +02:00 committed by GitHub
parent 8bddbd80f6
commit 6ae4fe2085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 11 deletions

View File

@ -69,11 +69,22 @@ const metaRules: Rule[] = [
type: 'object', // properties of the schema should be an object
additionalProperties: {
// with the following shape
type: 'object',
properties: {
description: { type: 'string' },
},
required: ['description'],
anyOf: [
{
type: 'object',
properties: {
description: { type: 'string' },
},
required: ['description'],
},
{
type: 'object',
properties: {
$ref: { type: 'string' },
},
required: ['$ref'],
},
],
},
},
},
@ -103,7 +114,6 @@ const metaRules: Rule[] = [
'featureEventsSchema',
'featureSchema',
'featuresSchema',
'featureStrategySchema',
'featureStrategySegmentSchema',
'featureTypeSchema',
'featureTypesSchema',
@ -132,7 +142,6 @@ const metaRules: Rule[] = [
'pushVariantsSchema',
'resetPasswordSchema',
'requestsPerSecondSchema',
'requestsPerSecondSegmentedSchema',
'roleSchema',
'sdkContextSchema',
'searchEventsSchema',

View File

@ -32,7 +32,6 @@ export const advancedPlaygroundRequestSchema = {
],
},
context: {
description: 'The context to use when evaluating toggles',
$ref: sdkContextSchema.$id,
},
},

View File

@ -30,7 +30,6 @@ export const playgroundRequestSchema = {
],
},
context: {
description: 'The context to use when evaluating toggles',
$ref: sdkContextSchema.$id,
},
},

View File

@ -835,7 +835,6 @@ The provider you choose for your addon dictates what properties the \`parameters
"properties": {
"context": {
"$ref": "#/components/schemas/sdkContextSchema",
"description": "The context to use when evaluating toggles",
},
"environments": {
"description": "The environments to evaluate toggles in.",
@ -3850,7 +3849,6 @@ The provider you choose for your addon dictates what properties the \`parameters
"properties": {
"context": {
"$ref": "#/components/schemas/sdkContextSchema",
"description": "The context to use when evaluating toggles",
},
"environment": {
"description": "The environment to evaluate toggles in.",