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/feature-metrics-schema.ts
andreas-unleash 64082440d4
OAS for client-metrics controller (#1739)
* 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
2022-06-27 11:17:44 +03:00

31 lines
828 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
import { featureEnvironmentMetricsSchema } from './feature-environment-metrics-schema';
export const featureMetricsSchema = {
$id: '#/components/schemas/featureMetricsSchema',
type: 'object',
additionalProperties: false,
required: ['version', 'maturity', 'data'],
properties: {
version: {
type: 'number',
},
maturity: {
type: 'string',
},
data: {
type: 'array',
items: {
$ref: '#/components/schemas/featureEnvironmentMetricsSchema',
},
},
},
components: {
schemas: {
featureEnvironmentMetricsSchema,
},
},
} as const;
export type FeatureMetricsSchema = FromSchema<typeof featureMetricsSchema>;