mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	* refactor: avoid duplicate feature strategy operationIds * refactor: fix flaky feature tests * refactor: remove duplicate controller error handling * refactor: unify feature strategy schemas * refactor: add schemas to strategy controller
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { FromSchema } from 'json-schema-to-ts';
 | |
| 
 | |
| export const strategySchema = {
 | |
|     $id: '#/components/schemas/strategySchema',
 | |
|     type: 'object',
 | |
|     additionalProperties: false,
 | |
|     required: [
 | |
|         'name',
 | |
|         'displayName',
 | |
|         'description',
 | |
|         'editable',
 | |
|         'deprecated',
 | |
|         'parameters',
 | |
|     ],
 | |
|     properties: {
 | |
|         name: {
 | |
|             type: 'string',
 | |
|         },
 | |
|         displayName: {
 | |
|             type: 'string',
 | |
|             nullable: true,
 | |
|         },
 | |
|         description: {
 | |
|             type: 'string',
 | |
|         },
 | |
|         editable: {
 | |
|             type: 'boolean',
 | |
|         },
 | |
|         deprecated: {
 | |
|             type: 'boolean',
 | |
|         },
 | |
|         parameters: {
 | |
|             type: 'array',
 | |
|             items: {
 | |
|                 type: 'object',
 | |
|                 additionalProperties: false,
 | |
|                 properties: {
 | |
|                     name: {
 | |
|                         type: 'string',
 | |
|                     },
 | |
|                     type: {
 | |
|                         type: 'string',
 | |
|                     },
 | |
|                     description: {
 | |
|                         type: 'string',
 | |
|                     },
 | |
|                     required: {
 | |
|                         type: 'boolean',
 | |
|                     },
 | |
|                 },
 | |
|             },
 | |
|         },
 | |
|     },
 | |
|     components: {},
 | |
| } as const;
 | |
| 
 | |
| export type StrategySchema = FromSchema<typeof strategySchema>;
 |