1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/feature-events-schema.ts
olav a34c674971
feat: add event search endpoint (#1893)
* feat: add event search endpoint

* refactor: expand variable names

* refactor: add table type to query builder

* refactor: improve schema limit/offset types

* refactor: describe searchEventsSchema fields
2022-08-09 16:14:50 +02:00

29 lines
721 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
import { eventSchema } from './event-schema';
import { tagSchema } from './tag-schema';
export const featureEventsSchema = {
$id: '#/components/schemas/featureEventsSchema',
type: 'object',
additionalProperties: false,
required: ['events'],
properties: {
version: { type: 'number' },
toggleName: {
type: 'string',
},
events: {
type: 'array',
items: { $ref: eventSchema.$id },
},
},
components: {
schemas: {
eventSchema,
tagSchema,
},
},
} as const;
export type FeatureEventsSchema = FromSchema<typeof featureEventsSchema>;