mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
refactor: type query params (#5153)
This commit is contained in:
parent
1bba76413f
commit
2c7b7c90e0
@ -55,8 +55,8 @@ export default class FeatureSearchController extends Controller {
|
||||
summary: 'Search and filter features',
|
||||
description: 'Search and filter by selected fields.',
|
||||
operationId: 'searchFeatures',
|
||||
// TODO: fix the type
|
||||
parameters: featureSearchQueryParameters as any,
|
||||
// top level array needs to be mutable according to openapi library
|
||||
parameters: [...featureSearchQueryParameters],
|
||||
responses: {
|
||||
200: createResponseSchema('searchFeaturesSchema'),
|
||||
...getStandardResponses(401, 403, 404),
|
||||
|
@ -5,7 +5,7 @@ export const featureSearchQueryParameters = [
|
||||
name: 'query',
|
||||
schema: {
|
||||
default: '',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
example: 'feature_a',
|
||||
},
|
||||
description: 'The search query for the feature or tag',
|
||||
@ -15,7 +15,7 @@ export const featureSearchQueryParameters = [
|
||||
name: 'projectId',
|
||||
schema: {
|
||||
default: '',
|
||||
type: 'string' as const,
|
||||
type: 'string',
|
||||
example: 'default',
|
||||
},
|
||||
description: 'Id of the project where search is performed',
|
||||
|
@ -11,6 +11,7 @@ type OpenApiParam = {
|
||||
// Parameter types:
|
||||
// https://swagger.io/docs/specification/describing-parameters/#types
|
||||
readonly in: 'query' | 'path' | 'header' | 'cookie';
|
||||
readonly description?: string;
|
||||
};
|
||||
|
||||
type RecurseOnParams<
|
||||
|
Loading…
Reference in New Issue
Block a user