2022-12-12 14:05:56 +01:00
import { FromSchema } from 'json-schema-to-ts' ;
export const requestsPerSecondSchema = {
$id : '#/components/schemas/requestsPerSecondSchema' ,
type : 'object' ,
properties : {
status : {
type : 'string' ,
} ,
data : {
type : 'object' ,
properties : {
resultType : {
type : 'string' ,
} ,
result : {
description :
'An array of values per metric. Each one represents a line in the graph labeled by its metric name' ,
type : 'array' ,
items : {
type : 'object' ,
properties : {
metric : {
description :
'A key value set representing the metric' ,
type : 'object' ,
properties : {
appName : {
type : 'string' ,
} ,
2022-12-19 17:06:59 +01:00
endpoint : {
type : 'string' ,
} ,
2022-12-12 14:05:56 +01:00
} ,
} ,
values : {
description :
'An array of arrays. Each element of the array is an array of size 2 consisting of the 2 axis for the graph: in position zero the x axis represented as a number and position one the y axis represented as string' ,
type : 'array' ,
items : {
type : 'array' ,
items : {
anyOf : [
{ type : 'string' } ,
{ type : 'number' } ,
] ,
} ,
} ,
} ,
} ,
} ,
} ,
} ,
} ,
} ,
components : { } ,
} as const ;
export type RequestsPerSecondSchema = FromSchema <
typeof requestsPerSecondSchema
> ;