1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/openapi/spec/push-variants-schema.ts
Thomas Heartman df59b10fb6
OpenAPI: more schema cleanup (#4353)
This PR fixes additional schemas that hadn't been described properly
2023-07-28 06:59:05 +00:00

34 lines
997 B
TypeScript

import { variantSchema } from './variant-schema';
import { FromSchema } from 'json-schema-to-ts';
import { overrideSchema } from './override-schema';
export const pushVariantsSchema = {
$id: '#/components/schemas/pushVariantsSchema',
type: 'object',
description: 'Data used when copying variants into a new environment.',
properties: {
variants: {
type: 'array',
description: 'The variants to write to the provided environments',
items: {
$ref: '#/components/schemas/variantSchema',
},
},
environments: {
type: 'array',
description: 'The enviromnents to write the provided variants to',
items: {
type: 'string',
},
},
},
components: {
schemas: {
variantSchema,
overrideSchema,
},
},
} as const;
export type PushVariantsSchema = FromSchema<typeof pushVariantsSchema>;