mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: Improve bulk metrics endpoint (#3213)
## About the changes This adds support for connectVia the way we intend to use it and start now supports also a string
This commit is contained in:
		
							parent
							
								
									8ebe62db05
								
							
						
					
					
						commit
						0916402abf
					
				@ -1,4 +1,5 @@
 | 
			
		||||
import { FromSchema } from 'json-schema-to-ts';
 | 
			
		||||
import { dateSchema } from './date-schema';
 | 
			
		||||
 | 
			
		||||
export const bulkRegistrationSchema = {
 | 
			
		||||
    $id: '#/components/schemas/bulkRegistrationSchema',
 | 
			
		||||
@ -8,8 +9,17 @@ export const bulkRegistrationSchema = {
 | 
			
		||||
        connectVia: {
 | 
			
		||||
            type: 'array',
 | 
			
		||||
            items: {
 | 
			
		||||
                type: 'object',
 | 
			
		||||
                required: ['appName', 'instanceId'],
 | 
			
		||||
                properties: {
 | 
			
		||||
                    appName: {
 | 
			
		||||
                        type: 'string',
 | 
			
		||||
                    },
 | 
			
		||||
                    instanceId: {
 | 
			
		||||
                        type: 'string',
 | 
			
		||||
                    },
 | 
			
		||||
                },
 | 
			
		||||
            },
 | 
			
		||||
        },
 | 
			
		||||
        appName: {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
@ -24,7 +34,7 @@ export const bulkRegistrationSchema = {
 | 
			
		||||
            type: 'number',
 | 
			
		||||
        },
 | 
			
		||||
        started: {
 | 
			
		||||
            type: 'number',
 | 
			
		||||
            $ref: '#/components/schemas/dateSchema',
 | 
			
		||||
        },
 | 
			
		||||
        strategies: {
 | 
			
		||||
            type: 'array',
 | 
			
		||||
@ -37,7 +47,9 @@ export const bulkRegistrationSchema = {
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    components: {
 | 
			
		||||
        schemas: {},
 | 
			
		||||
        schemas: {
 | 
			
		||||
            dateSchema,
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
} as const;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -352,8 +352,20 @@ exports[`should serve the OpenAPI spec 1`] = `
 | 
			
		||||
          },
 | 
			
		||||
          "connectVia": {
 | 
			
		||||
            "items": {
 | 
			
		||||
              "properties": {
 | 
			
		||||
                "appName": {
 | 
			
		||||
                  "type": "string",
 | 
			
		||||
                },
 | 
			
		||||
                "instanceId": {
 | 
			
		||||
                  "type": "string",
 | 
			
		||||
                },
 | 
			
		||||
              },
 | 
			
		||||
              "required": [
 | 
			
		||||
                "appName",
 | 
			
		||||
                "instanceId",
 | 
			
		||||
              ],
 | 
			
		||||
              "type": "object",
 | 
			
		||||
            },
 | 
			
		||||
            "type": "array",
 | 
			
		||||
          },
 | 
			
		||||
          "environment": {
 | 
			
		||||
@ -369,7 +381,7 @@ exports[`should serve the OpenAPI spec 1`] = `
 | 
			
		||||
            "type": "string",
 | 
			
		||||
          },
 | 
			
		||||
          "started": {
 | 
			
		||||
            "type": "number",
 | 
			
		||||
            "$ref": "#/components/schemas/dateSchema",
 | 
			
		||||
          },
 | 
			
		||||
          "strategies": {
 | 
			
		||||
            "items": {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user