1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00
unleash.unleash/src/lib/openapi/spec/validated-edge-tokens-schema.ts

28 lines
843 B
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { edgeTokenSchema } from './edge-token-schema';
export const validatedEdgeTokensSchema = {
$id: '#/components/schemas/validatedEdgeTokensSchema',
type: 'object',
additionalProperties: false,
required: ['tokens'],
description: `A object containing a list of valid Unleash tokens.`,
properties: {
tokens: {
description:
'The list of Unleash token objects. Each object contains the token itself and some additional metadata.',
type: 'array',
items: { $ref: '#/components/schemas/edgeTokenSchema' },
},
},
components: {
schemas: {
edgeTokenSchema,
},
},
} as const;
export type ValidatedEdgeTokensSchema = FromSchema<
typeof validatedEdgeTokensSchema
>;