mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
f91c8a338a
Update OpenAPI for `/api/admin/projects/{projectId}/features/` and related endpoints --------- Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
33 lines
878 B
TypeScript
33 lines
878 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { strategySchema } from './strategy-schema';
|
|
|
|
export const strategiesSchema = {
|
|
$id: '#/components/schemas/strategiesSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['version', 'strategies'],
|
|
description: 'List of strategies',
|
|
properties: {
|
|
version: {
|
|
type: 'integer',
|
|
enum: [1],
|
|
example: 1,
|
|
description: 'Version of the strategies schema',
|
|
},
|
|
strategies: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/strategySchema',
|
|
},
|
|
description: 'List of strategies',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
strategySchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type StrategiesSchema = FromSchema<typeof strategiesSchema>;
|