mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
f91c8a338a
Update OpenAPI for `/api/admin/projects/{projectId}/features/` and related endpoints --------- Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
34 lines
968 B
TypeScript
34 lines
968 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { environmentProjectSchema } from './environment-project-schema';
|
|
|
|
export const environmentsProjectSchema = {
|
|
$id: '#/components/schemas/environmentsProjectSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['version', 'environments'],
|
|
description: 'Environments defined for a given project',
|
|
properties: {
|
|
version: {
|
|
type: 'integer',
|
|
example: 1,
|
|
description: 'Version of the environments schema',
|
|
},
|
|
environments: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/environmentProjectSchema',
|
|
},
|
|
description: 'List of environments',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
environmentProjectSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type EnvironmentsProjectSchema = FromSchema<
|
|
typeof environmentsProjectSchema
|
|
>;
|