1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/src/lib/openapi/spec/application-overview-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

54 lines
1.9 KiB
TypeScript

import type { FromSchema } from 'json-schema-to-ts';
import { applicationOverviewEnvironmentSchema } from './application-overview-environment-schema';
import { applicationOverviewIssuesSchema } from './application-overview-issues-schema';
import { applicationEnvironmentIssuesSchema } from './application-environment-issues-schema';
export const applicationOverviewSchema = {
$id: '#/components/schemas/applicationOverviewSchema',
type: 'object',
description:
"Data about an application that's connected to Unleash via an SDK.",
additionalProperties: false,
required: ['projects', 'featureCount', 'environments', 'issues'],
properties: {
projects: {
description: 'The list of projects the application has been using.',
type: 'array',
items: {
type: 'string',
},
example: ['default', 'payment'],
},
featureCount: {
description:
'The number of features the application has been using.',
type: 'number',
example: 5,
},
environments: {
type: 'array',
description:
'The list of environments the application has been using.',
items: {
$ref: '#/components/schemas/applicationOverviewEnvironmentSchema',
},
},
issues: {
description:
'This list of issues that might be wrong with the application',
$ref: '#/components/schemas/applicationOverviewIssuesSchema',
},
},
components: {
schemas: {
applicationOverviewEnvironmentSchema,
applicationOverviewIssuesSchema,
applicationEnvironmentIssuesSchema,
},
},
} as const;
export type ApplicationOverviewSchema = FromSchema<
typeof applicationOverviewSchema
>;