From d46588526acedb7629e6f8cff93fa448bb318e84 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 18 May 2021 10:03:11 -0300 Subject: [PATCH] Bug 28370: Add missing additionalProperties in spec This patch adds missing attribute to the object definitions in the spec. We wrongly supposed it was the default, but it proved not. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1 => SUCCESS: Tests pass, nothing breaks! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind --- api/v1/swagger/paths/clubs.json | 3 ++- api/v1/swagger/paths/import_batch_profiles.json | 8 +++++--- api/v1/swagger/paths/patrons_extended_attributes.json | 3 ++- api/v1/swagger/paths/patrons_password.json | 3 ++- api/v1/swagger/paths/public_patrons.json | 11 +++++++---- api/v1/swagger/paths/return_claims.json | 9 ++++++--- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/api/v1/swagger/paths/clubs.json b/api/v1/swagger/paths/clubs.json index 3da704f3eb..32862074d3 100644 --- a/api/v1/swagger/paths/clubs.json +++ b/api/v1/swagger/paths/clubs.json @@ -44,7 +44,8 @@ "type": "integer" } }, - "required": [ "pickup_library_id" ] + "required": [ "pickup_library_id" ], + "additionalProperties": false } } ], diff --git a/api/v1/swagger/paths/import_batch_profiles.json b/api/v1/swagger/paths/import_batch_profiles.json index 588a67d6e4..14853ab4ba 100644 --- a/api/v1/swagger/paths/import_batch_profiles.json +++ b/api/v1/swagger/paths/import_batch_profiles.json @@ -130,7 +130,8 @@ "description": "any comments added when the file was uploaded", "type": ["string", "null"] } - } + }, + "additionalProperties": false } } ], @@ -250,7 +251,8 @@ "description": "any comments added when the file was uploaded", "type": ["string", "null"] } - } + }, + "additionalProperties": false } } ], @@ -357,4 +359,4 @@ } } } -} \ No newline at end of file +} diff --git a/api/v1/swagger/paths/patrons_extended_attributes.json b/api/v1/swagger/paths/patrons_extended_attributes.json index 0f9201b9ca..d8af0f3b4b 100644 --- a/api/v1/swagger/paths/patrons_extended_attributes.json +++ b/api/v1/swagger/paths/patrons_extended_attributes.json @@ -281,7 +281,8 @@ "description": "Extended attribute value", "type": "string" } - } + }, + "additionalProperties": false } } ], diff --git a/api/v1/swagger/paths/patrons_password.json b/api/v1/swagger/paths/patrons_password.json index 7384f76f17..2de2e29c92 100644 --- a/api/v1/swagger/paths/patrons_password.json +++ b/api/v1/swagger/paths/patrons_password.json @@ -26,7 +26,8 @@ "type": "string" } }, - "required": ["password", "password_2"] + "required": ["password", "password_2"], + "additionalProperties": false } } ], diff --git a/api/v1/swagger/paths/public_patrons.json b/api/v1/swagger/paths/public_patrons.json index 5db073c4eb..7b424d964f 100644 --- a/api/v1/swagger/paths/public_patrons.json +++ b/api/v1/swagger/paths/public_patrons.json @@ -34,7 +34,8 @@ "password", "password_repeated", "old_password" - ] + ], + "additionalProperties": false } } ], @@ -109,7 +110,8 @@ "allowed": { "type": "boolean" } - } + }, + "additionalProperties": false } } ], @@ -184,7 +186,8 @@ "allowed": { "type": "boolean" } - } + }, + "additionalProperties": false } } ], @@ -237,4 +240,4 @@ } } } -} \ No newline at end of file +} diff --git a/api/v1/swagger/paths/return_claims.json b/api/v1/swagger/paths/return_claims.json index 2c1046d136..6e48eae30d 100644 --- a/api/v1/swagger/paths/return_claims.json +++ b/api/v1/swagger/paths/return_claims.json @@ -34,7 +34,8 @@ "description": "Charge a lost fee if true and Koha is set to allow a choice. Ignored otherwise.", "type": "boolean" } - } + }, + "additionalProperties": false } } ], @@ -133,7 +134,8 @@ "description": "Interal identifier for the librarian updating the claim notes", "type": "string" } - } + }, + "additionalProperties": false } } ], @@ -300,7 +302,8 @@ "description": "User id for the librarian resolving the claim", "type": "string" } - } + }, + "additionalProperties": false } } ], -- 2.11.0