1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/admin-features-query-schema.ts
Thomas Heartman 12209ae21c
OpenAPI: clean up remaining schemas, part 1 (#4351)
Part of linear task 1-1167. Fixes the first slew of schemas missing
descriptions/examples, etc.
2023-07-28 08:45:56 +02:00

33 lines
960 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
export const adminFeaturesQuerySchema = {
$id: '#/components/schemas/adminFeaturesQuerySchema',
type: 'object',
additionalProperties: false,
description:
'Query parameters used to modify the list of features returned.',
properties: {
tag: {
type: 'array',
items: {
type: 'string',
pattern: '\\w+:\\w+',
},
description:
'Used to filter by tags. For each entry, a TAGTYPE:TAGVALUE is expected',
example: ['simple:mytag'],
},
namePrefix: {
type: 'string',
description:
'A case-insensitive prefix filter for the names of feature toggles',
example: 'demo.part1',
},
},
components: {},
} as const;
export type AdminFeaturesQuerySchema = FromSchema<
typeof adminFeaturesQuerySchema
>;