1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-21 13:47:39 +02:00
unleash.unleash/src/lib/openapi/spec/playground-response-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

51 lines
1.8 KiB
TypeScript

import type { FromSchema } from 'json-schema-to-ts';
import { sdkContextSchema } from './sdk-context-schema';
import { playgroundRequestSchema } from './playground-request-schema';
import { playgroundFeatureSchema } from './playground-feature-schema';
import { constraintSchema } from './constraint-schema';
import { parametersSchema } from './parameters-schema';
import { variantSchema } from './variant-schema';
import { overrideSchema } from './override-schema';
import { playgroundConstraintSchema } from './playground-constraint-schema';
import { playgroundSegmentSchema } from './playground-segment-schema';
import { playgroundStrategySchema } from './playground-strategy-schema';
export const playgroundResponseSchema = {
$id: '#/components/schemas/playgroundResponseSchema',
description: 'The state of all features given the provided input.',
type: 'object',
additionalProperties: false,
required: ['features', 'input'],
properties: {
input: {
description: 'The given input used to evaluate the features.',
$ref: playgroundRequestSchema.$id,
},
features: {
type: 'array',
description: 'The list of features that have been evaluated.',
items: {
$ref: playgroundFeatureSchema.$id,
},
},
},
components: {
schemas: {
constraintSchema,
parametersSchema,
playgroundConstraintSchema,
playgroundFeatureSchema,
playgroundRequestSchema,
playgroundSegmentSchema,
playgroundStrategySchema,
sdkContextSchema,
variantSchema,
overrideSchema,
},
},
} as const;
export type PlaygroundResponseSchema = FromSchema<
typeof playgroundResponseSchema
>;