1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/src/lib/openapi/spec/import-toggles-validate-item-schema.ts

34 lines
1.1 KiB
TypeScript
Raw Normal View History

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,
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',
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',
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
>;