2022-06-17 21:35:26 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
import { apiTokenSchema } from './api-token-schema';
|
|
|
|
|
|
|
|
export const apiTokensSchema = {
|
|
|
|
$id: '#/components/schemas/apiTokensSchema',
|
|
|
|
type: 'object',
|
2023-07-06 09:30:31 +02:00
|
|
|
description:
|
|
|
|
'An object with [Unleash API tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys)',
|
2022-06-17 21:35:26 +02:00
|
|
|
additionalProperties: false,
|
|
|
|
required: ['tokens'],
|
|
|
|
properties: {
|
|
|
|
tokens: {
|
|
|
|
type: 'array',
|
2023-07-06 09:30:31 +02:00
|
|
|
description: 'A list of Unleash API tokens.',
|
2022-06-17 21:35:26 +02:00
|
|
|
items: {
|
|
|
|
$ref: '#/components/schemas/apiTokenSchema',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {
|
|
|
|
apiTokenSchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type ApiTokensSchema = FromSchema<typeof apiTokensSchema>;
|