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';
|
2023-01-19 14:17:36 +01:00
|
|
|
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';
|
2023-02-01 12:14:49 +01:00
|
|
|
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,
|
2023-02-01 12:14:49 +01:00
|
|
|
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',
|
|
|
|
},
|
|
|
|
},
|
2023-02-01 12:14:49 +01:00
|
|
|
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,
|
2023-01-19 14:17:36 +01:00
|
|
|
variantsSchema,
|
|
|
|
variantSchema,
|
|
|
|
overrideSchema,
|
|
|
|
constraintSchema,
|
|
|
|
parametersSchema,
|
|
|
|
legalValueSchema,
|
2023-02-01 12:14:49 +01:00
|
|
|
tagTypeSchema,
|
2023-01-11 16:00:20 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type ExportResultSchema = FromSchema<typeof exportResultSchema>;
|