mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-10 17:53:36 +02:00
Feat: add initial event schema
This commit is contained in:
parent
64082440d4
commit
4154747b10
40
src/lib/openapi/spec/event-schema.ts
Normal file
40
src/lib/openapi/spec/event-schema.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import { FromSchema } from 'json-schema-to-ts';
|
||||
|
||||
export const eventSchema = {
|
||||
$id: '#/components/schemas/eventSchema',
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['id', 'createdAt', 'type', 'createdBy'],
|
||||
properties: {
|
||||
id: {
|
||||
type: 'integer',
|
||||
minimum: 1,
|
||||
},
|
||||
createdAt: {
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
},
|
||||
type: {
|
||||
type: 'string',
|
||||
},
|
||||
createdBy: {
|
||||
type: 'string',
|
||||
},
|
||||
project: {
|
||||
type: 'string',
|
||||
},
|
||||
featureName: {
|
||||
type: 'string',
|
||||
},
|
||||
data: {},
|
||||
preData: {},
|
||||
tags: {
|
||||
type: 'array',
|
||||
items: {
|
||||
$ref: '#/components/schemas/tagSchema',
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export type EventSchema = FromSchema<typeof eventSchema>;
|
Loading…
Reference in New Issue
Block a user