1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/upsert-context-field-schema.ts

38 lines
862 B
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { legalValueSchema } from './legal-value-schema';
export const upsertContextFieldSchema = {
$id: '#/components/schemas/upsertContextFieldSchema',
type: 'object',
required: ['name'],
properties: {
name: {
type: 'string',
},
description: {
type: 'string',
},
stickiness: {
type: 'boolean',
},
sortOrder: {
type: 'number',
},
legalValues: {
type: 'array',
items: {
$ref: '#/components/schemas/legalValueSchema',
},
},
},
components: {
schemas: {
legalValueSchema,
},
},
} as const;
export type UpsertContextFieldSchema = FromSchema<
typeof upsertContextFieldSchema
>;