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/feature-search-query-parameters.ts

52 lines
1.3 KiB
TypeScript
Raw Normal View History

import { FromQueryParams } from '../util/from-query-params';
export const featureSearchQueryParameters = [
{
name: 'query',
schema: {
2023-10-26 10:05:47 +02:00
type: 'string',
example: 'feature_a',
},
description: 'The search query for the feature or tag',
in: 'query',
},
{
name: 'projectId',
schema: {
2023-10-26 10:05:47 +02:00
type: 'string',
example: 'default',
},
2023-10-26 15:29:30 +02:00
description: 'Id of the project where search and filter is performed',
in: 'query',
},
{
name: 'type',
schema: {
type: 'array',
items: {
type: 'string',
example: 'release',
},
},
description: 'The list of feature types to filter by',
in: 'query',
},
2023-10-26 17:20:57 +02:00
{
name: 'tag',
schema: {
type: 'array',
items: {
type: 'string',
example: 'simple:my_tag',
},
},
description:
'The list of feature tags to filter by. Feature tag has to specify type and value joined with a colon.',
in: 'query',
},
] as const;
2023-10-26 15:29:30 +02:00
export type FeatureSearchQueryParameters = Partial<
FromQueryParams<typeof featureSearchQueryParameters>
>;