mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
64082440d4
* OAS for client-metrics controller * bug and tests * update snapshot * update snapshot * update snapshot * bug fix * fix PR comments * refactoring re PR comments * re order routes * remove grouped-client-metrics-schema.ts * remove grouped-client-metrics-schema.ts * updated response * updated snapshot * PR comments * PR comments * Added tests * Added tests * fix * fix * fix
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { featureEnvironmentMetricsSchema } from './feature-environment-metrics-schema';
|
|
|
|
export const featureUsageSchema = {
|
|
$id: '#/components/schemas/featureUsageSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: [
|
|
'version',
|
|
'maturity',
|
|
'featureName',
|
|
'lastHourUsage',
|
|
'seenApplications',
|
|
],
|
|
properties: {
|
|
version: {
|
|
type: 'number',
|
|
},
|
|
maturity: {
|
|
type: 'string',
|
|
},
|
|
featureName: {
|
|
type: 'string',
|
|
},
|
|
lastHourUsage: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/featureEnvironmentMetricsSchema',
|
|
},
|
|
},
|
|
seenApplications: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'string',
|
|
},
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
featureEnvironmentMetricsSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type FeatureUsageSchema = FromSchema<typeof featureUsageSchema>;
|