mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-10 17:53:36 +02:00
Feat: add "variants" as a required property on playground response
This commit is contained in:
parent
cb56846f7f
commit
789b70dcfe
@ -2,6 +2,7 @@ import { FromSchema } from 'json-schema-to-ts';
|
|||||||
import { sdkContextSchema } from './sdk-context-schema';
|
import { sdkContextSchema } from './sdk-context-schema';
|
||||||
import { playgroundRequestSchema } from './playground-request-schema';
|
import { playgroundRequestSchema } from './playground-request-schema';
|
||||||
import { playgroundFeatureSchema } from './playground-feature-schema';
|
import { playgroundFeatureSchema } from './playground-feature-schema';
|
||||||
|
import { featureVariantsSchema } from './feature-variants-schema';
|
||||||
|
|
||||||
export const playgroundResponseSchema = {
|
export const playgroundResponseSchema = {
|
||||||
$id: '#/components/schemas/playgroundResponseSchema',
|
$id: '#/components/schemas/playgroundResponseSchema',
|
||||||
@ -16,15 +17,30 @@ export const playgroundResponseSchema = {
|
|||||||
features: {
|
features: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
items: {
|
items: {
|
||||||
$ref: playgroundFeatureSchema.$id,
|
allOf: [
|
||||||
|
{ $ref: playgroundFeatureSchema.$id },
|
||||||
|
{
|
||||||
|
type: 'object',
|
||||||
|
required: ['variants'],
|
||||||
|
properties: {
|
||||||
|
variants: {
|
||||||
|
type: 'array',
|
||||||
|
items: {
|
||||||
|
$ref: featureVariantsSchema.$id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
schemas: {
|
schemas: {
|
||||||
sdkContextSchema,
|
featureVariantsSchema,
|
||||||
playgroundRequestSchema,
|
|
||||||
playgroundFeatureSchema,
|
playgroundFeatureSchema,
|
||||||
|
playgroundRequestSchema,
|
||||||
|
sdkContextSchema,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -1877,8 +1877,26 @@ Object {
|
|||||||
"properties": Object {
|
"properties": Object {
|
||||||
"features": Object {
|
"features": Object {
|
||||||
"items": Object {
|
"items": Object {
|
||||||
|
"allOf": Array [
|
||||||
|
Object {
|
||||||
"$ref": "#/components/schemas/playgroundFeatureSchema",
|
"$ref": "#/components/schemas/playgroundFeatureSchema",
|
||||||
},
|
},
|
||||||
|
Object {
|
||||||
|
"properties": Object {
|
||||||
|
"variants": Object {
|
||||||
|
"items": Object {
|
||||||
|
"$ref": "#/components/schemas/featureVariantsSchema",
|
||||||
|
},
|
||||||
|
"type": "array",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"required": Array [
|
||||||
|
"variants",
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
},
|
},
|
||||||
"input": Object {
|
"input": Object {
|
||||||
|
Loading…
Reference in New Issue
Block a user