mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02:00
refactor: disallow additionalProperties in response schemas (#1543)
This commit is contained in:
parent
ec878110d9
commit
c02865504e
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
|||||||
|
|
||||||
export const schema = {
|
export const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
additionalProperties: false,
|
||||||
required: ['contextName', 'operator'],
|
required: ['contextName', 'operator'],
|
||||||
properties: {
|
properties: {
|
||||||
contextName: {
|
contextName: {
|
||||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
|||||||
|
|
||||||
const schema = {
|
const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
additionalProperties: false,
|
||||||
required: ['name', 'project'],
|
required: ['name', 'project'],
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
|||||||
|
|
||||||
export const schema = {
|
export const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
additionalProperties: false,
|
||||||
required: ['version', 'features'],
|
required: ['version', 'features'],
|
||||||
properties: {
|
properties: {
|
||||||
version: {
|
version: {
|
||||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
|||||||
|
|
||||||
export const schema = {
|
export const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
additionalProperties: false,
|
||||||
required: ['contextName', 'values'],
|
required: ['contextName', 'values'],
|
||||||
properties: {
|
properties: {
|
||||||
contextName: {
|
contextName: {
|
||||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
|||||||
|
|
||||||
export const schema = {
|
export const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
additionalProperties: false,
|
||||||
required: ['id', 'name', 'constraints', 'parameters'],
|
required: ['id', 'name', 'constraints', 'parameters'],
|
||||||
properties: {
|
properties: {
|
||||||
id: {
|
id: {
|
||||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
|||||||
|
|
||||||
export const schema = {
|
export const schema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
additionalProperties: false,
|
||||||
required: ['name', 'weight', 'weightType', 'stickiness', 'overrides'],
|
required: ['name', 'weight', 'weightType', 'stickiness', 'overrides'],
|
||||||
properties: {
|
properties: {
|
||||||
name: {
|
name: {
|
||||||
|
@ -52,6 +52,7 @@ Object {
|
|||||||
"components": Object {
|
"components": Object {
|
||||||
"schemas": Object {
|
"schemas": Object {
|
||||||
"constraintSchema": Object {
|
"constraintSchema": Object {
|
||||||
|
"additionalProperties": false,
|
||||||
"properties": Object {
|
"properties": Object {
|
||||||
"contextName": Object {
|
"contextName": Object {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -93,6 +94,7 @@ Object {
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
},
|
},
|
||||||
"featureSchema": Object {
|
"featureSchema": Object {
|
||||||
|
"additionalProperties": false,
|
||||||
"properties": Object {
|
"properties": Object {
|
||||||
"createdAt": Object {
|
"createdAt": Object {
|
||||||
"format": "date",
|
"format": "date",
|
||||||
@ -145,6 +147,7 @@ Object {
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
},
|
},
|
||||||
"featuresSchema": Object {
|
"featuresSchema": Object {
|
||||||
|
"additionalProperties": false,
|
||||||
"properties": Object {
|
"properties": Object {
|
||||||
"features": Object {
|
"features": Object {
|
||||||
"items": Object {
|
"items": Object {
|
||||||
@ -163,6 +166,7 @@ Object {
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
},
|
},
|
||||||
"overrideSchema": Object {
|
"overrideSchema": Object {
|
||||||
|
"additionalProperties": false,
|
||||||
"properties": Object {
|
"properties": Object {
|
||||||
"contextName": Object {
|
"contextName": Object {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -181,6 +185,7 @@ Object {
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
},
|
},
|
||||||
"strategySchema": Object {
|
"strategySchema": Object {
|
||||||
|
"additionalProperties": false,
|
||||||
"properties": Object {
|
"properties": Object {
|
||||||
"constraints": Object {
|
"constraints": Object {
|
||||||
"items": Object {
|
"items": Object {
|
||||||
@ -207,6 +212,7 @@ Object {
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
},
|
},
|
||||||
"variantSchema": Object {
|
"variantSchema": Object {
|
||||||
|
"additionalProperties": false,
|
||||||
"properties": Object {
|
"properties": Object {
|
||||||
"name": Object {
|
"name": Object {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
Loading…
Reference in New Issue
Block a user