mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
4ab8accf5c
This fixes the last few exceptions to our meta schema validation
22 lines
682 B
TypeScript
22 lines
682 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { updateContextFieldSchema } from './update-context-field-schema';
|
|
|
|
export const createContextFieldSchema = {
|
|
...updateContextFieldSchema,
|
|
$id: '#/components/schemas/createContextFieldSchema',
|
|
description: 'Data used to create a context field configuration.',
|
|
required: ['name'],
|
|
properties: {
|
|
...updateContextFieldSchema.properties,
|
|
name: {
|
|
description: 'The name of the context field.',
|
|
type: 'string',
|
|
example: 'subscriptionTier',
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type CreateContextFieldSchema = FromSchema<
|
|
typeof createContextFieldSchema
|
|
>;
|