unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
46 lines • 1.58 kB
JavaScript
import { ALL } from '../../types/models/api-token.js';
import { sdkContextSchema } from './sdk-context-schema.js';
export const advancedPlaygroundRequestSchema = {
$id: '#/components/schemas/advancedPlaygroundRequestSchema',
description: 'Data for the playground API to evaluate toggles in advanced mode with environment and context multi selection',
type: 'object',
required: ['environments', 'context'],
properties: {
environments: {
type: 'array',
items: {
type: 'string',
minLength: 1,
pattern: '^[a-zA-Z0-9~_.-]+$',
},
minItems: 1,
example: ['development', 'production'],
description: 'The environments to evaluate toggles in.',
},
projects: {
description: 'A list of projects to check for toggles in.',
oneOf: [
{
type: 'array',
items: { type: 'string' },
example: ['my-project'],
description: 'A list of projects to check for toggles in.',
},
{
type: 'string',
enum: [ALL],
description: 'Check toggles in all projects.',
},
],
},
context: {
$ref: sdkContextSchema.$id,
},
},
components: {
schemas: {
sdkContextSchema,
},
},
};
//# sourceMappingURL=advanced-playground-request-schema.js.map