mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +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,7 +9,16 @@ export const bulkRegistrationSchema = {
|
||||
connectVia: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
type: 'object',
|
||||
required: ['appName', 'instanceId'],
|
||||
properties: {
|
||||
appName: {
|
||||
type: 'string',
|
||||
},
|
||||
instanceId: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
appName: {
|
||||
@ -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,7 +352,19 @@ exports[`should serve the OpenAPI spec 1`] = `
|
||||
},
|
||||
"connectVia": {
|
||||
"items": {
|
||||
"type": "string",
|
||||
"properties": {
|
||||
"appName": {
|
||||
"type": "string",
|
||||
},
|
||||
"instanceId": {
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
"required": [
|
||||
"appName",
|
||||
"instanceId",
|
||||
],
|
||||
"type": "object",
|
||||
},
|
||||
"type": "array",
|
||||
},
|
||||
@ -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