-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathvariant-schema.ts
37 lines (34 loc) · 961 Bytes
/
variant-schema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { type CreateSchemaType, createSchemaObject } from '../openapi-types';
export const schema = {
type: 'object',
required: ['name', 'enabled'],
additionalProperties: false,
properties: {
name: {
type: 'string',
},
enabled: {
type: 'boolean',
},
feature_enabled: {
type: 'boolean',
},
featureEnabled: {
type: 'boolean',
},
payload: {
type: 'object',
additionalProperties: false,
required: ['type', 'value'],
properties: {
type: {
type: 'string',
enum: ['string', 'json', 'csv', 'number'],
},
value: { type: 'string' },
},
},
},
} as const;
export type VariantSchema = CreateSchemaType<typeof schema>;
export const variantSchema = createSchemaObject(schema);