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 { FromSchema } from 'json-schema-to-ts';
|
||||||
|
import { dateSchema } from './date-schema';
|
||||||
|
|
||||||
export const bulkRegistrationSchema = {
|
export const bulkRegistrationSchema = {
|
||||||
$id: '#/components/schemas/bulkRegistrationSchema',
|
$id: '#/components/schemas/bulkRegistrationSchema',
|
||||||
@ -8,7 +9,16 @@ export const bulkRegistrationSchema = {
|
|||||||
connectVia: {
|
connectVia: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
items: {
|
items: {
|
||||||
type: 'string',
|
type: 'object',
|
||||||
|
required: ['appName', 'instanceId'],
|
||||||
|
properties: {
|
||||||
|
appName: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
instanceId: {
|
||||||
|
type: 'string',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
appName: {
|
appName: {
|
||||||
@ -24,7 +34,7 @@ export const bulkRegistrationSchema = {
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
started: {
|
started: {
|
||||||
type: 'number',
|
$ref: '#/components/schemas/dateSchema',
|
||||||
},
|
},
|
||||||
strategies: {
|
strategies: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
@ -37,7 +47,9 @@ export const bulkRegistrationSchema = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
schemas: {},
|
schemas: {
|
||||||
|
dateSchema,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
@ -352,7 +352,19 @@ exports[`should serve the OpenAPI spec 1`] = `
|
|||||||
},
|
},
|
||||||
"connectVia": {
|
"connectVia": {
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string",
|
"properties": {
|
||||||
|
"appName": {
|
||||||
|
"type": "string",
|
||||||
|
},
|
||||||
|
"instanceId": {
|
||||||
|
"type": "string",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"appName",
|
||||||
|
"instanceId",
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
},
|
},
|
||||||
"type": "array",
|
"type": "array",
|
||||||
},
|
},
|
||||||
@ -369,7 +381,7 @@ exports[`should serve the OpenAPI spec 1`] = `
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
},
|
},
|
||||||
"started": {
|
"started": {
|
||||||
"type": "number",
|
"$ref": "#/components/schemas/dateSchema",
|
||||||
},
|
},
|
||||||
"strategies": {
|
"strategies": {
|
||||||
"items": {
|
"items": {
|
||||||
|
Loading…
Reference in New Issue
Block a user