Bug 28370: Add missing additionalProperties in spec
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 18 May 2021 13:03:11 +0000 (10:03 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 May 2021 07:28:17 +0000 (09:28 +0200)
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 <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
api/v1/swagger/paths/clubs.json
api/v1/swagger/paths/import_batch_profiles.json
api/v1/swagger/paths/patrons_extended_attributes.json
api/v1/swagger/paths/patrons_password.json
api/v1/swagger/paths/public_patrons.json
api/v1/swagger/paths/return_claims.json

index 3da704f..3286207 100644 (file)
@@ -44,7 +44,8 @@
                       "type": "integer"
                     }
                   },
-                  "required": [ "pickup_library_id" ]
+                  "required": [ "pickup_library_id" ],
+                  "additionalProperties": false
                 }
               }
             ],
index 588a67d..14853ab 100644 (file)
                 "description": "any comments added when the file was uploaded",
                 "type": ["string", "null"]
               }
-            }
+            },
+            "additionalProperties": false
           }
         }
       ],
                 "description": "any comments added when the file was uploaded",
                 "type": ["string", "null"]
               }
-            }
+            },
+            "additionalProperties": false
           }
         }
       ],
       }
     }
   }
-}
\ No newline at end of file
+}
index 0f9201b..d8af0f3 100644 (file)
                 "description": "Extended attribute value",
                 "type": "string"
               }
-            }
+            },
+            "additionalProperties": false
           }
         }
       ],
index 7384f76..2de2e29 100644 (file)
@@ -26,7 +26,8 @@
                 "type": "string"
               }
             },
-            "required": ["password", "password_2"]
+            "required": ["password", "password_2"],
+            "additionalProperties": false
           }
         }
       ],
index 5db073c..7b424d9 100644 (file)
@@ -34,7 +34,8 @@
                             "password",
                             "password_repeated",
                             "old_password"
-                        ]
+                        ],
+                        "additionalProperties": false
                     }
                 }
             ],
                             "allowed": {
                                 "type": "boolean"
                             }
-                        }
+                        },
+                        "additionalProperties": false
                     }
                 }
             ],
                             "allowed": {
                                 "type": "boolean"
                             }
-                        }
+                        },
+                        "additionalProperties": false
                     }
                 }
             ],
             }
         }
     }
-}
\ No newline at end of file
+}
index 2c1046d..6e48eae 100644 (file)
@@ -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
           }
         }
       ],
                 "description": "Interal identifier for the librarian updating the claim notes",
                 "type": "string"
               }
-            }
+            },
+            "additionalProperties": false
           }
         }
       ],
                 "description": "User id for the librarian resolving the claim",
                 "type": "string"
               }
-            }
+            },
+            "additionalProperties": false
           }
         }
       ],