1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/openapi/spec/override-schema.ts
Christopher Kolstad b8da1ce2a9
docs: OpenAPI Client tag (#3979)
### What
Adds documentation for open api endpoints tagged with `Client`.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-06-14 12:19:00 +00:00

30 lines
890 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
export const overrideSchema = {
$id: '#/components/schemas/overrideSchema',
type: 'object',
additionalProperties: false,
required: ['contextName', 'values'],
description:
'An override for deciding which variant should be assigned to a user based on the context name',
properties: {
contextName: {
description:
'The name of the context field used to determine overrides',
type: 'string',
example: 'userId',
},
values: {
description: 'Which values that should be overriden',
type: 'array',
items: {
type: 'string',
},
example: ['red', 'blue'],
},
},
components: {},
} as const;
export type OverrideSchema = FromSchema<typeof overrideSchema>;