1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

openapi: small adjustments to dashboard schemas (#8363)

This PR contains a number of small updates to the dashboard schemas,
including rewording descriptions, changing numbers to integers, setting
minimum values.
This commit is contained in:
Thomas Heartman 2024-10-04 12:52:14 +02:00 committed by GitHub
parent d760af321f
commit 89b619deba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 31 additions and 19 deletions

View File

@ -17,7 +17,8 @@ export const personalDashboardProjectDetailsSchema = {
properties: {
insights: {
type: 'object',
description: 'Insights for the project',
description:
'Insights for the project, including flag data and project health information.',
additionalProperties: false,
required: [
'avgHealthCurrentWindow',
@ -30,44 +31,52 @@ export const personalDashboardProjectDetailsSchema = {
],
properties: {
avgHealthCurrentWindow: {
type: 'number',
type: 'integer',
minimum: 0,
description:
'The average health score in the current window of the last 4 weeks',
"The project's average health score over the last 4 weeks",
example: 80,
nullable: true,
},
avgHealthPastWindow: {
type: 'number',
type: 'integer',
minimum: 0,
description:
'The average health score in the previous 4 weeks before the current window',
"The project's average health score over the previous 4-week window",
example: 70,
nullable: true,
},
totalFlags: {
type: 'number',
type: 'integer',
minimum: 0,
example: 100,
description: 'The current number of all flags',
description: 'The current number of non-archived flags',
},
activeFlags: {
type: 'number',
type: 'integer',
minimum: 0,
example: 98,
description: 'The current number of active flags',
description:
'The number of active flags that are not stale or potentially stale',
},
staleFlags: {
type: 'number',
type: 'integer',
minimum: 0,
example: 0,
description:
'The current number of user marked stale flags',
'The current number of flags that have been manually marked as stale',
},
potentiallyStaleFlags: {
type: 'number',
type: 'integer',
minimum: 0,
example: 2,
description:
'The current number of time calculated potentially stale flags',
'The number of potentially stale flags as calculated by Unleash',
},
health: {
type: 'number',
description: 'The current health score of the project',
type: 'integer',
minimum: 0,
description: "The project's current health score",
example: 80,
},
},
@ -129,7 +138,7 @@ export const personalDashboardProjectDetailsSchema = {
},
type: {
type: 'string',
enum: ['custom', 'project', 'root', 'custom-root'],
enum: ['custom', 'project'],
example: 'project',
description: 'The type of the role',
},

View File

@ -99,19 +99,22 @@ export const personalDashboardSchema = {
description: 'The name of the project',
},
health: {
type: 'number',
type: 'integer',
example: 50,
minimum: 0,
description:
"An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100",
},
memberCount: {
type: 'number',
type: 'integer',
example: 4,
minimum: 0,
description: 'The number of members this project has',
},
featureCount: {
type: 'number',
type: 'integer',
example: 10,
minimum: 0,
description: 'The number of features this project has',
},
},