2022-06-08 08:01:14 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
2022-05-04 15:16:18 +02:00
|
|
|
import { featureSchema } from './feature-schema';
|
2022-05-24 08:37:35 +02:00
|
|
|
import { parametersSchema } from './parameters-schema';
|
|
|
|
import { variantSchema } from './variant-schema';
|
|
|
|
import { overrideSchema } from './override-schema';
|
|
|
|
import { constraintSchema } from './constraint-schema';
|
2022-06-23 08:10:20 +02:00
|
|
|
import { featureStrategySchema } from './feature-strategy-schema';
|
2022-06-08 15:31:34 +02:00
|
|
|
import { environmentSchema } from './environment-schema';
|
2023-01-11 09:53:43 +01:00
|
|
|
import { featureEnvironmentSchema } from './feature-environment-schema';
|
2023-07-13 13:50:03 +02:00
|
|
|
import { strategyVariantSchema } from './strategy-variant-schema';
|
2022-04-25 14:17:59 +02:00
|
|
|
|
2022-06-08 08:01:14 +02:00
|
|
|
export const featuresSchema = {
|
|
|
|
$id: '#/components/schemas/featuresSchema',
|
2022-04-25 14:17:59 +02:00
|
|
|
type: 'object',
|
2022-04-29 08:09:27 +02:00
|
|
|
additionalProperties: false,
|
2022-04-25 14:17:59 +02:00
|
|
|
required: ['version', 'features'],
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'A list of features',
|
|
|
|
deprecated: true,
|
2022-04-25 14:17:59 +02:00
|
|
|
properties: {
|
|
|
|
version: {
|
|
|
|
type: 'integer',
|
2023-07-14 16:48:35 +02:00
|
|
|
description: "The version of the feature's schema",
|
2022-04-25 14:17:59 +02:00
|
|
|
},
|
|
|
|
features: {
|
|
|
|
type: 'array',
|
2022-05-24 08:37:35 +02:00
|
|
|
items: {
|
|
|
|
$ref: '#/components/schemas/featureSchema',
|
|
|
|
},
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'A list of features',
|
2022-04-25 14:17:59 +02:00
|
|
|
},
|
|
|
|
},
|
2022-06-08 08:01:14 +02:00
|
|
|
components: {
|
|
|
|
schemas: {
|
|
|
|
constraintSchema,
|
2022-06-08 15:31:34 +02:00
|
|
|
environmentSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
featureSchema,
|
|
|
|
overrideSchema,
|
2023-01-11 09:53:43 +01:00
|
|
|
featureEnvironmentSchema,
|
2022-06-23 08:10:20 +02:00
|
|
|
featureStrategySchema,
|
2023-07-13 13:50:03 +02:00
|
|
|
strategyVariantSchema,
|
2023-01-11 09:53:43 +01:00
|
|
|
parametersSchema,
|
2022-06-08 08:01:14 +02:00
|
|
|
variantSchema,
|
|
|
|
},
|
Complete open api schemas for project features controller (#1563)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* Completed OpenAPI Schemas for ProjectFeatures Controller
Completed OpenAPI Schemas for Feature Controller (tags)
* bug fix
* bug fix
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* fix merge conflicts, some refactoring
* added emptyResponse, patch feature operation schemas and request
* added emptyResponse, patch feature operation schemas and request
* patch strategy
* patch strategy
* update strategy
* update strategy
* fix pr comment
* fix pr comments
* improvements
* added operationId to schema for better generation
* fix pr comment
* fix pr comment
* fix pr comment
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* improvements to generated and dynamic types
* Update response types to use inferred types
* Update addTag response status to 201
* refactor: move schema ref destructuring into createSchemaObject
* made serialize date handle deep objects
* made serialize date handle deep objects
* add `name` to IFeatureStrategy nad fix tests
* fix pr comments
* fix pr comments
* Add types to IAuthRequest
* Sync StrategySchema for FE and BE - into the rabbit hole
* Sync model with OAS spec
* revert
* revert
* revert
* revert
* revert
* mapper
* revert
* revert
* revert
* remove serialize-dates.ts
* remove serialize-dates.ts
* remove serialize-dates.ts
* remove serialize-dates.ts
* remove serialize-dates.ts
* revert
* revert
* add mappers
* add mappers
* fix pr comments
* ignore report.json
* ignore report.json
* Route permission required
Co-authored-by: olav <mail@olav.io>
2022-05-18 15:17:09 +02:00
|
|
|
},
|
2022-04-25 14:17:59 +02:00
|
|
|
} as const;
|
|
|
|
|
2022-06-08 08:01:14 +02:00
|
|
|
export type FeaturesSchema = FromSchema<typeof featuresSchema>;
|