unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
59 lines • 2.01 kB
JavaScript
import { dateSchema } from './date-schema.js';
export const featureEnvironmentMetricsSchema = {
$id: '#/components/schemas/featureEnvironmentMetricsSchema',
type: 'object',
additionalProperties: false,
required: ['environment', 'timestamp', 'yes', 'no'],
description: 'How many times `feautreName` was evaluated to `true` (yes) and `false` (no) for `appName` in `environmnet`',
properties: {
featureName: {
description: 'The name of the feature',
type: 'string',
example: 'my.special.feature',
},
appName: {
description: 'The name of the application the SDK is being used in',
type: 'string',
example: 'accounting',
},
environment: {
description: 'Which environment the SDK is being used in',
type: 'string',
example: 'development',
},
timestamp: {
description: 'The start of the time window these metrics are valid for. The window is usually 1 hour wide',
example: '1926-05-08T12:00:00.000Z',
$ref: '#/components/schemas/dateSchema',
},
yes: {
description: 'How many times the toggle evaluated to true',
type: 'integer',
example: 974,
minimum: 0,
},
no: {
description: 'How many times the toggle evaluated to false',
type: 'integer',
example: 50,
minimum: 0,
},
variants: {
description: 'How many times each variant was returned',
type: 'object',
additionalProperties: {
type: 'integer',
minimum: 0,
},
example: {
variantA: 15,
variantB: 25,
variantC: 5,
},
},
},
components: {
dateSchema,
},
};
//# sourceMappingURL=feature-environment-metrics-schema.js.map