mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01: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 = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['contextName', 'operator'],
|
||||
properties: {
|
||||
contextName: {
|
||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
||||
|
||||
const schema = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['name', 'project'],
|
||||
properties: {
|
||||
name: {
|
||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
||||
|
||||
export const schema = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['version', 'features'],
|
||||
properties: {
|
||||
version: {
|
||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
||||
|
||||
export const schema = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['contextName', 'values'],
|
||||
properties: {
|
||||
contextName: {
|
||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
||||
|
||||
export const schema = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['id', 'name', 'constraints', 'parameters'],
|
||||
properties: {
|
||||
id: {
|
||||
|
@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
|
||||
|
||||
export const schema = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['name', 'weight', 'weightType', 'stickiness', 'overrides'],
|
||||
properties: {
|
||||
name: {
|
||||
|
@ -52,6 +52,7 @@ Object {
|
||||
"components": Object {
|
||||
"schemas": Object {
|
||||
"constraintSchema": Object {
|
||||
"additionalProperties": false,
|
||||
"properties": Object {
|
||||
"contextName": Object {
|
||||
"type": "string",
|
||||
@ -93,6 +94,7 @@ Object {
|
||||
"type": "object",
|
||||
},
|
||||
"featureSchema": Object {
|
||||
"additionalProperties": false,
|
||||
"properties": Object {
|
||||
"createdAt": Object {
|
||||
"format": "date",
|
||||
@ -145,6 +147,7 @@ Object {
|
||||
"type": "object",
|
||||
},
|
||||
"featuresSchema": Object {
|
||||
"additionalProperties": false,
|
||||
"properties": Object {
|
||||
"features": Object {
|
||||
"items": Object {
|
||||
@ -163,6 +166,7 @@ Object {
|
||||
"type": "object",
|
||||
},
|
||||
"overrideSchema": Object {
|
||||
"additionalProperties": false,
|
||||
"properties": Object {
|
||||
"contextName": Object {
|
||||
"type": "string",
|
||||
@ -181,6 +185,7 @@ Object {
|
||||
"type": "object",
|
||||
},
|
||||
"strategySchema": Object {
|
||||
"additionalProperties": false,
|
||||
"properties": Object {
|
||||
"constraints": Object {
|
||||
"items": Object {
|
||||
@ -207,6 +212,7 @@ Object {
|
||||
"type": "object",
|
||||
},
|
||||
"variantSchema": Object {
|
||||
"additionalProperties": false,
|
||||
"properties": Object {
|
||||
"name": Object {
|
||||
"type": "string",
|
||||
|
Loading…
Reference in New Issue
Block a user