2022-06-21 09:12:40 +02:00
import { FromSchema } from 'json-schema-to-ts' ;
export const applicationSchema = {
$id : '#/components/schemas/applicationSchema' ,
type : 'object' ,
additionalProperties : false ,
required : [ 'appName' ] ,
properties : {
appName : {
2023-04-26 12:10:57 +02:00
description : 'Name of the application' ,
2022-06-21 09:12:40 +02:00
type : 'string' ,
2023-04-26 12:10:57 +02:00
example : 'accounting' ,
2022-06-21 09:12:40 +02:00
} ,
sdkVersion : {
2023-04-26 12:10:57 +02:00
description :
'Which SDK and version the application reporting uses. Typically represented as `<identifier>:<version>`' ,
2022-06-21 09:12:40 +02:00
type : 'string' ,
2023-04-26 12:10:57 +02:00
example : 'unleash-client-java:8.0.0' ,
2022-06-21 09:12:40 +02:00
} ,
strategies : {
2023-04-26 12:10:57 +02:00
description :
'Which [strategies](https://docs.getunleash.io/topics/the-anatomy-of-unleash#activation-strategies) the application has loaded. Useful when trying to figure out if your [custom strategy](https://docs.getunleash.io/reference/custom-activation-strategies) has been loaded in the SDK' ,
2022-06-21 09:12:40 +02:00
type : 'array' ,
items : {
type : 'string' ,
} ,
2023-04-26 12:10:57 +02:00
example : [ 'standard' , 'gradualRollout' , 'mySpecialCustomStrategy' ] ,
2022-06-21 09:12:40 +02:00
} ,
description : {
2023-04-26 12:10:57 +02:00
description :
'Extra information added about the application reporting the metrics. Only present if added via the Unleash Admin interface' ,
2022-06-21 09:12:40 +02:00
type : 'string' ,
2023-04-26 12:10:57 +02:00
example : 'Application for reporting page visits' ,
2022-06-21 09:12:40 +02:00
} ,
url : {
2023-04-26 12:10:57 +02:00
description :
'A link to reference the application reporting the metrics. Could for instance be a GitHub link to the repository of the application' ,
2022-06-21 09:12:40 +02:00
type : 'string' ,
2023-04-26 12:10:57 +02:00
example : 'https://github.com/Unleash/unleash-client-proxy-js' ,
2022-06-21 09:12:40 +02:00
} ,
color : {
2023-04-26 12:10:57 +02:00
description : ` The CSS color that is used to color the application's entry in the application list ` ,
2022-06-21 09:12:40 +02:00
type : 'string' ,
2023-04-26 12:10:57 +02:00
example : 'red' ,
2022-06-21 09:12:40 +02:00
} ,
icon : {
2023-04-26 12:10:57 +02:00
description : ` An URL to an icon file to be used for the applications's entry in the application list ` ,
2022-06-21 09:12:40 +02:00
type : 'string' ,
2023-04-26 12:10:57 +02:00
example : 'https://github.com/favicon.ico' ,
2022-06-21 09:12:40 +02:00
} ,
} ,
components : { } ,
} as const ;
export type ApplicationSchema = FromSchema < typeof applicationSchema > ;