1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/openapi/spec/import-toggles-validate-item-schema.ts
andreas-unleash 64c1527213
chore: document endpoint tagged Unstable (#4118)
Adds description and summary to all endpoints with Unstable tag
2023-07-04 14:41:16 +00:00

34 lines
1.1 KiB
TypeScript

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.',
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:',
},
affectedItems: {
type: 'array',
description: 'The items affected by this error message ',
example: ['some-feature-a', 'some-feature-b'],
items: {
type: 'string',
},
},
},
components: {
schemas: {},
},
} as const;
export type ImportTogglesValidateItemSchema = FromSchema<
typeof importTogglesValidateItemSchema
>;