2023-02-16 08:08:51 +01:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
|
|
|
|
export const importTogglesValidateItemSchema = {
|
|
|
|
$id: '#/components/schemas/importTogglesValidateItemSchema',
|
|
|
|
type: 'object',
|
|
|
|
required: ['message', 'affectedItems'],
|
|
|
|
additionalProperties: false,
|
2023-07-04 16:41:16 +02:00
|
|
|
description:
|
|
|
|
'A description of an error or warning pertaining to a feature toggle import job.',
|
2023-02-16 08:08:51 +01:00
|
|
|
properties: {
|
|
|
|
message: {
|
|
|
|
type: 'string',
|
2023-07-04 16:41:16 +02:00
|
|
|
description: 'The validation error message',
|
|
|
|
example:
|
|
|
|
'You cannot import a feature that already exist in other projects. You already have the following features defined outside of project default:',
|
2023-02-16 08:08:51 +01:00
|
|
|
},
|
|
|
|
affectedItems: {
|
|
|
|
type: 'array',
|
2023-07-04 16:41:16 +02:00
|
|
|
description: 'The items affected by this error message ',
|
|
|
|
example: ['some-feature-a', 'some-feature-b'],
|
2023-02-16 08:08:51 +01:00
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type ImportTogglesValidateItemSchema = FromSchema<
|
|
|
|
typeof importTogglesValidateItemSchema
|
|
|
|
>;
|