mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
e875e67d24
* open api implementation - client features controller * open api implementation - client features controller * bug fix * test fix * PR comments * OAS for client-api metrics.ts * Refactoring * Refactoring * bug fix * fix PR comments * PR comment * PR comment
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { constraintSchema } from './constraint-schema';
|
|
import { parametersSchema } from './parameters-schema';
|
|
|
|
export const featureStrategySchema = {
|
|
$id: '#/components/schemas/featureStrategySchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['name'],
|
|
properties: {
|
|
id: {
|
|
type: 'string',
|
|
},
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
sortOrder: {
|
|
type: 'number',
|
|
},
|
|
segments: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'number',
|
|
},
|
|
},
|
|
constraints: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/constraintSchema',
|
|
},
|
|
},
|
|
parameters: {
|
|
$ref: '#/components/schemas/parametersSchema',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
constraintSchema,
|
|
parametersSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type FeatureStrategySchema = FromSchema<typeof featureStrategySchema>;
|