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
35 lines
816 B
TypeScript
35 lines
816 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { constraintSchema } from './constraint-schema';
|
|
|
|
export const segmentSchema = {
|
|
$id: '#/components/schemas/segmentSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['id', 'constraints'],
|
|
properties: {
|
|
id: {
|
|
type: 'number',
|
|
},
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
description: {
|
|
type: 'string',
|
|
nullable: true,
|
|
},
|
|
constraints: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/constraintSchema',
|
|
},
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
constraintSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type SegmentSchema = FromSchema<typeof segmentSchema>;
|