mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
485dab87d4
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->
Improves the openapi schema specifications for the schemas belonging to
the "Projects" tag.
Expected error codes/http statues, descriptions, and example data
---------
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { healthOverviewSchema } from './health-overview-schema';
|
|
|
|
export const healthReportSchema = {
|
|
...healthOverviewSchema,
|
|
$id: '#/components/schemas/healthReportSchema',
|
|
description:
|
|
'A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature toggles.',
|
|
required: [
|
|
...healthOverviewSchema.required,
|
|
'potentiallyStaleCount',
|
|
'activeCount',
|
|
'staleCount',
|
|
],
|
|
properties: {
|
|
...healthOverviewSchema.properties,
|
|
potentiallyStaleCount: {
|
|
type: 'number',
|
|
description: 'The number of potentially stale feature toggles.',
|
|
example: 5,
|
|
},
|
|
activeCount: {
|
|
type: 'number',
|
|
description: 'The number of active feature toggles.',
|
|
example: 2,
|
|
},
|
|
staleCount: {
|
|
type: 'number',
|
|
description: 'The number of stale feature toggles.',
|
|
example: 10,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type HealthReportSchema = FromSchema<typeof healthReportSchema>;
|