mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
chore: remove additionalProperterties: true
annotation. (#4508)
Unless you set `additionalProperties` to `false`, additional properties are always allowed. By explicitly setting it to `true` the generated examples contain additional properties, e.g.: ```json { "tokens": [ "aproject:development.randomstring", "[]:production.randomstring" ], "additionalProp1": {} } ``` By removing the explicit annotation, we still allow additional properties, but we don't get them in examples: ```json { "tokens": [ "aproject:development.randomstring", "[]:production.randomstring" ] } ```
This commit is contained in:
parent
a2bd7d42a1
commit
7ea4e5d5b9
@ -5,7 +5,6 @@ export const clientMetricsEnvSchema = {
|
||||
$id: '#/components/schemas/clientMetricsEnvSchema',
|
||||
type: 'object',
|
||||
required: ['featureName', 'appName', 'environment'],
|
||||
additionalProperties: true,
|
||||
description: 'Used for reporting feature evaluation results from SDKs',
|
||||
properties: {
|
||||
featureName: {
|
||||
|
@ -3,7 +3,6 @@ import { FromSchema } from 'json-schema-to-ts';
|
||||
export const createApplicationSchema = {
|
||||
$id: '#/components/schemas/createApplicationSchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
description: 'Reported application information from Unleash SDKs',
|
||||
properties: {
|
||||
appName: {
|
||||
|
@ -4,7 +4,6 @@ import { groupSchema } from './group-schema';
|
||||
export const createGroupSchema = {
|
||||
$id: '#/components/schemas/createGroupSchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
required: ['name'],
|
||||
description: 'A detailed information about a user group',
|
||||
properties: {
|
||||
|
@ -3,7 +3,6 @@ import { FromSchema } from 'json-schema-to-ts';
|
||||
export const createStrategyVariantSchema = {
|
||||
$id: '#/components/schemas/createStrategyVariantSchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
description:
|
||||
"This is an experimental property. It may change or be removed as we work on it. Please don't depend on it yet. A strategy variant allows you to attach any data to strategies instead of only returning `true`/`false`. Strategy variants take precedence over feature variants.",
|
||||
required: ['name', 'weight', 'weightType', 'stickiness'],
|
||||
|
@ -7,7 +7,6 @@ const eventDataSchema = {
|
||||
type: 'object',
|
||||
nullable: true,
|
||||
'x-enforcer-exception-skip-codes': 'WSCH006', // allow additional properties in example (openapi enforcer)
|
||||
additionalProperties: true,
|
||||
description:
|
||||
'Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable.',
|
||||
example: {
|
||||
|
@ -3,7 +3,6 @@ import { FromSchema } from 'json-schema-to-ts';
|
||||
export const exportQuerySchema = {
|
||||
$id: '#/components/schemas/exportQuerySchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
required: ['environment'],
|
||||
description:
|
||||
'Available query parameters for the [deprecated export/import](https://docs.getunleash.io/reference/deploy/import-export) functionality.',
|
||||
|
@ -4,7 +4,6 @@ export const sdkContextSchema = {
|
||||
$id: '#/components/schemas/sdkContextSchema',
|
||||
description: 'The Unleash context as modeled in client SDKs',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
required: ['appName'],
|
||||
properties: {
|
||||
appName: {
|
||||
|
@ -15,7 +15,6 @@ import { strategyVariantSchema } from './strategy-variant-schema';
|
||||
export const stateSchema = {
|
||||
$id: '#/components/schemas/stateSchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
deprecated: true,
|
||||
description:
|
||||
'The application state as used by the deprecated export/import APIs.',
|
||||
|
@ -3,7 +3,6 @@ import { FromSchema } from 'json-schema-to-ts';
|
||||
export const tokenStringListSchema = {
|
||||
$id: '#/components/schemas/tokenStringListSchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
description: 'A list of unleash tokens to validate against known tokens',
|
||||
required: ['tokens'],
|
||||
properties: {
|
||||
|
@ -3,7 +3,6 @@ import { FromSchema } from 'json-schema-to-ts';
|
||||
export const updateUserSchema = {
|
||||
$id: '#/components/schemas/updateUserSchema',
|
||||
type: 'object',
|
||||
additionalProperties: true,
|
||||
description: 'All fields that can be directly changed for the user',
|
||||
properties: {
|
||||
email: {
|
||||
|
Loading…
Reference in New Issue
Block a user