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/client-metrics-env-schema.ts

44 lines
1022 B
TypeScript
Raw Normal View History

import { dateSchema } from './date-schema';
import { FromSchema } from 'json-schema-to-ts';
export const clientMetricsEnvSchema = {
$id: '#/components/schemas/clientMetricsEnvSchema',
type: 'object',
required: ['featureName', 'appName'],
additionalProperties: true,
properties: {
featureName: {
type: 'string',
},
appName: {
type: 'string',
},
environment: {
type: 'string',
},
timestamp: {
$ref: '#/components/schemas/dateSchema',
},
yes: {
type: 'number',
},
no: {
type: 'number',
},
variants: {
type: 'object',
additionalProperties: {
type: 'integer',
minimum: 0,
},
},
},
components: {
schemas: {
dateSchema,
},
},
} as const;
export type ClientMetricsSchema = FromSchema<typeof clientMetricsEnvSchema>;