1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00
unleash.unleash/src/lib/openapi/spec/requests-per-second-segmented-schema.ts
Christopher Kolstad 4ce78ccecd
docs: add description to requests per seconds schemas (#4182)
### 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>
2023-07-10 08:18:08 +00:00

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
>;