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/export-result-schema.ts

85 lines
2.6 KiB
TypeScript
Raw Normal View History

2023-01-11 16:00:20 +01:00
import { FromSchema } from 'json-schema-to-ts';
import { featureSchema } from './feature-schema';
import { featureStrategySchema } from './feature-strategy-schema';
2023-01-17 12:10:20 +01:00
import { featureEnvironmentSchema } from './feature-environment-schema';
import { contextFieldSchema } from './context-field-schema';
import { featureTagSchema } from './feature-tag-schema';
2023-01-18 09:41:22 +01:00
import { segmentSchema } from './segment-schema';
import { parametersSchema } from './parameters-schema';
import { legalValueSchema } from './legal-value-schema';
import { variantSchema } from './variant-schema';
import { overrideSchema } from './override-schema';
import { variantsSchema } from './variants-schema';
import { constraintSchema } from './constraint-schema';
import { tagTypeSchema } from './tag-type-schema';
2023-01-11 16:00:20 +01:00
export const exportResultSchema = {
$id: '#/components/schemas/exportResultSchema',
type: 'object',
additionalProperties: false,
required: ['features', 'featureStrategies', 'tagTypes'],
2023-01-11 16:00:20 +01:00
properties: {
features: {
type: 'array',
items: {
$ref: '#/components/schemas/featureSchema',
},
},
featureStrategies: {
type: 'array',
items: {
$ref: '#/components/schemas/featureStrategySchema',
},
},
2023-01-17 12:10:20 +01:00
featureEnvironments: {
type: 'array',
items: {
$ref: '#/components/schemas/featureEnvironmentSchema',
},
},
contextFields: {
type: 'array',
items: {
$ref: '#/components/schemas/contextFieldSchema',
},
},
featureTags: {
type: 'array',
items: {
$ref: '#/components/schemas/featureTagSchema',
},
},
2023-01-18 09:41:22 +01:00
segments: {
type: 'array',
items: {
$ref: '#/components/schemas/segmentSchema',
},
},
tagTypes: {
type: 'array',
items: {
$ref: '#/components/schemas/tagTypeSchema',
},
},
2023-01-11 16:00:20 +01:00
},
components: {
schemas: {
featureSchema,
featureStrategySchema,
2023-01-17 12:10:20 +01:00
featureEnvironmentSchema,
contextFieldSchema,
featureTagSchema,
2023-01-18 09:41:22 +01:00
segmentSchema,
variantsSchema,
variantSchema,
overrideSchema,
constraintSchema,
parametersSchema,
legalValueSchema,
tagTypeSchema,
2023-01-11 16:00:20 +01:00
},
},
} as const;
export type ExportResultSchema = FromSchema<typeof exportResultSchema>;