Skip to content

Commit

Permalink
openapi: remove all the extra data info (#4277)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Jul 19, 2023
1 parent 87cec6c commit 5dd78f3
Showing 1 changed file with 2 additions and 64 deletions.
66 changes: 2 additions & 64 deletions src/lib/openapi/spec/event-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,70 +5,9 @@ import { variantSchema } from './variant-schema';

const eventDataSchema = {
type: 'object',
nullable: true,
'x-enforcer-exception-skip-codes': 'WSCH006', // allow additional properties in example (openapi enforcer)
additionalProperties: true,
properties: {
name: {
type: 'string',
description:
'Name of the feature toggle/strategy/environment that this event relates to',
example: 'my.first.toggle',
nullable: true,
},
description: {
type: 'string',
description: 'The description of the object this event relates to',
example: 'Toggle description',
nullable: true,
},
type: {
type: 'string',
description:
'If this event relates to a feature toggle, the type of feature toggle.',
example: 'release',
nullable: true,
},
project: {
type: 'string',
description: 'The project this event relates to',
example: 'default',
nullable: true,
},
stale: {
description: 'Is the feature toggle this event relates to stale',
type: 'boolean',
example: true,
nullable: true,
},
variants: {
description: 'Variants configured for this toggle',
type: 'array',
items: {
$ref: '#/components/schemas/variantSchema',
},
nullable: true,
},
createdAt: {
type: 'string',
format: 'date-time',
description:
'The time the event happened as a RFC 3339-conformant timestamp.',
example: '2023-07-05T12:56:00.000Z',
nullable: true,
},
lastSeenAt: {
type: 'string',
format: 'date-time',
description: 'The time the feature was last seen',
example: '2023-07-05T12:56:00.000Z',
nullable: true,
},
impressionData: {
description:
'Should [impression events](https://docs.getunleash.io/reference/impression-data) activate for this feature toggle',
type: 'boolean',
example: false,
},
},
description:
'Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable.',
example: {
Expand Down Expand Up @@ -139,7 +78,6 @@ export const eventSchema = {
...eventDataSchema,
description:
"Data relating to the previous state of the event's subject.",
nullable: true,
},
tags: {
type: 'array',
Expand Down

0 comments on commit 5dd78f3

Please sign in to comment.