mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
f91c8a338a
Update OpenAPI for `/api/admin/projects/{projectId}/features/` and related endpoints --------- Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
32 lines
897 B
TypeScript
32 lines
897 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { environmentSchema } from './environment-schema';
|
|
|
|
export const environmentsSchema = {
|
|
$id: '#/components/schemas/environmentsSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['version', 'environments'],
|
|
description: 'A versioned list of environments',
|
|
properties: {
|
|
version: {
|
|
type: 'integer',
|
|
example: 1,
|
|
description: 'Version of the environments schema',
|
|
},
|
|
environments: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/environmentSchema',
|
|
},
|
|
description: 'List of environments',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
environmentSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type EnvironmentsSchema = FromSchema<typeof environmentsSchema>;
|