2022-11-11 11:24:56 +01:00
|
|
|
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'],
|
2023-04-04 15:45:34 +02:00
|
|
|
description: 'Environments defined for a given project',
|
2022-11-11 11:24:56 +01:00
|
|
|
properties: {
|
|
|
|
version: {
|
|
|
|
type: 'integer',
|
2023-07-14 16:48:35 +02:00
|
|
|
example: 1,
|
|
|
|
description: 'Version of the environments schema',
|
2022-11-11 11:24:56 +01:00
|
|
|
},
|
|
|
|
environments: {
|
|
|
|
type: 'array',
|
|
|
|
items: {
|
|
|
|
$ref: '#/components/schemas/environmentProjectSchema',
|
|
|
|
},
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'List of environments',
|
2022-11-11 11:24:56 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {
|
|
|
|
environmentProjectSchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type EnvironmentsProjectSchema = FromSchema<
|
|
|
|
typeof environmentsProjectSchema
|
|
|
|
>;
|