2022-06-10 10:04:56 +02:00
|
|
|
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'],
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'A versioned list of environments',
|
2022-06-10 10:04:56 +02:00
|
|
|
properties: {
|
|
|
|
version: {
|
|
|
|
type: 'integer',
|
2023-07-14 16:48:35 +02:00
|
|
|
example: 1,
|
|
|
|
description: 'Version of the environments schema',
|
2022-06-10 10:04:56 +02:00
|
|
|
},
|
|
|
|
environments: {
|
|
|
|
type: 'array',
|
|
|
|
items: {
|
|
|
|
$ref: '#/components/schemas/environmentSchema',
|
|
|
|
},
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'List of environments',
|
2022-06-10 10:04:56 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {
|
|
|
|
environmentSchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type EnvironmentsSchema = FromSchema<typeof environmentsSchema>;
|