mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
4ce78ccecd
### What Adds a quick and dirty description to requestPerSeconds and segmentedRequestPerSecondsSchema so the enterprise /rps endpoint has better API docs. --------- Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
25 lines
769 B
TypeScript
25 lines
769 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { requestsPerSecondSchema } from './requests-per-second-schema';
|
|
export const requestsPerSecondSegmentedSchema = {
|
|
$id: '#/components/schemas/requestsPerSecondSegmentedSchema',
|
|
type: 'object',
|
|
description: 'Get usage metrics separated by client and admin paths',
|
|
properties: {
|
|
clientMetrics: {
|
|
$ref: '#/components/schemas/requestsPerSecondSchema',
|
|
},
|
|
adminMetrics: {
|
|
$ref: '#/components/schemas/requestsPerSecondSchema',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
requestsPerSecondSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type RequestsPerSecondSegmentedSchema = FromSchema<
|
|
typeof requestsPerSecondSegmentedSchema
|
|
>;
|