1
0
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:
olav 2022-04-29 08:09:27 +02:00 committed by GitHub
parent ec878110d9
commit c02865504e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
export const schema = {
type: 'object',
additionalProperties: false,
required: ['contextName', 'operator'],
properties: {
contextName: {

View File

@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
const schema = {
type: 'object',
additionalProperties: false,
required: ['name', 'project'],
properties: {
name: {

View File

@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
export const schema = {
type: 'object',
additionalProperties: false,
required: ['version', 'features'],
properties: {
version: {

View File

@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
export const schema = {
type: 'object',
additionalProperties: false,
required: ['contextName', 'values'],
properties: {
contextName: {

View File

@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
export const schema = {
type: 'object',
additionalProperties: false,
required: ['id', 'name', 'constraints', 'parameters'],
properties: {
id: {

View File

@ -2,6 +2,7 @@ import { createSchemaObject, CreateSchemaType } from '../types';
export const schema = {
type: 'object',
additionalProperties: false,
required: ['name', 'weight', 'weightType', 'stickiness', 'overrides'],
properties: {
name: {

View File

@ -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",