-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: schema for paginated applications (#6309)
- Loading branch information
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { FromQueryParams } from '../util/from-query-params'; | ||
|
||
export const applicationsQueryParameters = [ | ||
{ | ||
name: 'query', | ||
schema: { | ||
type: 'string', | ||
example: 'first_app', | ||
}, | ||
description: 'The search query for the application name', | ||
in: 'query', | ||
}, | ||
{ | ||
name: 'offset', | ||
schema: { | ||
type: 'string', | ||
example: '50', | ||
}, | ||
description: | ||
'The number of applications to skip when returning a page. By default it is set to 0.', | ||
in: 'query', | ||
}, | ||
{ | ||
name: 'limit', | ||
schema: { | ||
type: 'string', | ||
example: '50', | ||
}, | ||
description: | ||
'The number of applications to return in a page. By default it is set to 1000.', | ||
in: 'query', | ||
}, | ||
{ | ||
name: 'sortBy', | ||
schema: { | ||
type: 'string', | ||
example: 'type', | ||
}, | ||
description: | ||
'The field to sort the results by. By default it is set to "appName".', | ||
in: 'query', | ||
}, | ||
{ | ||
name: 'sortOrder', | ||
schema: { | ||
type: 'string', | ||
example: 'desc', | ||
}, | ||
description: | ||
'The sort order for the sortBy. By default it is det to "asc".', | ||
in: 'query', | ||
}, | ||
] as const; | ||
|
||
export type ApplicationsQueryParameters = Partial< | ||
FromQueryParams<typeof applicationsQueryParameters> | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters