1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/openapi/spec/clone-feature-schema.ts
Tymoteusz Czech f91c8a338a
fix: feature OpenAPI endpoints - project related (#4212)
Update OpenAPI for `/api/admin/projects/{projectId}/features/` and
related endpoints

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-07-14 16:48:35 +02:00

25 lines
835 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
export const cloneFeatureSchema = {
$id: '#/components/schemas/cloneFeatureSchema',
type: 'object',
required: ['name'],
description: 'Copy of a feature with a new name',
properties: {
name: {
type: 'string',
description: 'The name of the new feature',
example: 'new-feature',
},
replaceGroupId: {
type: 'boolean',
example: true,
description:
'Whether to use the new feature name as its group ID or not. Group ID is used for calculating [stickiness](https://docs.getunleash.io/reference/stickiness#calculation). Defaults to true.',
},
},
components: {},
} as const;
export type CloneFeatureSchema = FromSchema<typeof cloneFeatureSchema>;