Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openapi: small adjustments to dashboard schemas #8363

Merged
merged 8 commits into from
Oct 4, 2024
41 changes: 25 additions & 16 deletions src/lib/openapi/spec/personal-dashboard-project-details-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
},
},
Expand Down Expand Up @@ -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',
},
Expand Down
9 changes: 6 additions & 3 deletions src/lib/openapi/spec/personal-dashboard-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
Expand Down
Loading