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-environment-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

35 lines
817 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
export const featureEnvironmentMetricsSchema = {
$id: '#/components/schemas/featureEnvironmentMetricsSchema',
type: 'object',
additionalProperties: false,
required: ['environment', 'timestamp', 'yes', 'no'],
properties: {
featureName: {
type: 'string',
},
appName: {
type: 'string',
},
environment: {
type: 'string',
},
timestamp: {
type: 'string',
format: 'date-time',
},
yes: {
type: 'number',
},
no: {
type: 'number',
},
},
components: {},
} as const;
export type FeatureEnvironmentMetricsSchema = FromSchema<
typeof featureEnvironmentMetricsSchema
>;