2022-06-08 14:57:39 +02:00
import { FromSchema } from 'json-schema-to-ts' ;
export const versionSchema = {
$id : '#/components/schemas/versionSchema' ,
type : 'object' ,
additionalProperties : false ,
2023-07-19 17:18:47 +02:00
description : 'Detailed information about an Unleash version' ,
required : [ 'current' , 'latest' , 'isLatest' ] ,
2022-06-08 14:57:39 +02:00
properties : {
current : {
type : 'object' ,
additionalProperties : false ,
2023-07-19 17:18:47 +02:00
description : 'The current version of Unleash.' ,
2022-06-08 14:57:39 +02:00
properties : {
oss : {
2023-07-19 17:18:47 +02:00
description :
'The OSS version used when building this Unleash instance, represented as a git revision belonging to the [main Unleash git repo](https://github.com/Unleash/unleash/)' ,
example : '5.3.0-main' ,
2022-06-08 14:57:39 +02:00
type : 'string' ,
} ,
enterprise : {
2023-07-19 17:18:47 +02:00
description :
'The Enterpris version of Unleash used to build this instance, represented as a git revision belonging to the [Unleash Enterprise](https://github.com/ivarconr/unleash-enterprise) repository. Will be an empty string if no enterprise version was used,' ,
example : '5.3.0-main+2105.45ed03c9' ,
2022-06-08 14:57:39 +02:00
type : 'string' ,
} ,
} ,
} ,
latest : {
type : 'object' ,
additionalProperties : false ,
2023-07-19 17:18:47 +02:00
description :
'Information about the latest available Unleash releases. Will be an empty object if no data is available.' ,
2022-06-08 14:57:39 +02:00
properties : {
oss : {
2023-07-19 17:18:47 +02:00
description : 'The latest available OSS version of Unleash' ,
2022-06-08 14:57:39 +02:00
type : 'string' ,
2023-07-19 17:18:47 +02:00
example : '5.1.5' ,
2022-06-08 14:57:39 +02:00
} ,
enterprise : {
2023-07-19 17:18:47 +02:00
description :
'The latest available Enterprise version of Unleash' ,
2022-06-08 14:57:39 +02:00
type : 'string' ,
2023-07-19 17:18:47 +02:00
example : '5.1.5' ,
2022-06-08 14:57:39 +02:00
} ,
} ,
} ,
isLatest : {
type : 'boolean' ,
2023-07-19 17:18:47 +02:00
description :
'Whether the Unleash server is running the latest release (`true`) or if there are updates available (`false`)' ,
example : true ,
2022-06-08 14:57:39 +02:00
} ,
instanceId : {
type : 'string' ,
2023-07-19 17:18:47 +02:00
description : 'The instance identifier of the Unleash instance' ,
example : '0d652a82-43db-4144-8e02-864b0b030710' ,
2022-06-08 14:57:39 +02:00
} ,
} ,
components : { } ,
} as const ;
export type VersionSchema = FromSchema < typeof versionSchema > ;