mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
35 lines
842 B
TypeScript
35 lines
842 B
TypeScript
|
import { FromSchema } from 'json-schema-to-ts';
|
||
|
import { constraintSchema } from './constraint-schema';
|
||
|
|
||
|
export const upsertSegmentSchema = {
|
||
|
$id: '#/components/schemas/upsertSegmentSchema',
|
||
|
type: 'object',
|
||
|
required: ['name', 'constraints'],
|
||
|
properties: {
|
||
|
name: {
|
||
|
type: 'string',
|
||
|
},
|
||
|
description: {
|
||
|
type: 'string',
|
||
|
nullable: true,
|
||
|
},
|
||
|
project: {
|
||
|
type: 'string',
|
||
|
nullable: true,
|
||
|
},
|
||
|
constraints: {
|
||
|
type: 'array',
|
||
|
items: {
|
||
|
$ref: '#/components/schemas/constraintSchema',
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
components: {
|
||
|
schemas: {
|
||
|
constraintSchema,
|
||
|
},
|
||
|
},
|
||
|
} as const;
|
||
|
|
||
|
export type UpsertSegmentSchema = FromSchema<typeof upsertSegmentSchema>;
|