* [pbs-devel] applied: [PATCH proxmox-backup] verify-api: fix allOf duplicates check
@ 2020-12-30 11:36 Fabian Grünbichler
0 siblings, 0 replies; only message in thread
From: Fabian Grünbichler @ 2020-12-30 11:36 UTC (permalink / raw)
To: pbs-devel; +Cc: Wolfgang Bumiller
it triggered with a wrongly-formatted message on schemas that did NOT
contain any duplicates..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
Note: we are still lacking the same checks for CLI handlers and their schema..
tests/verify-api.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/verify-api.rs b/tests/verify-api.rs
index 7b7371f6..83a26a21 100644
--- a/tests/verify-api.rs
+++ b/tests/verify-api.rs
@@ -46,8 +46,8 @@ fn verify_all_of_schema(schema: &AllOfSchema) -> Result<(), Error> {
let mut keys = HashSet::<&'static str>::new();
let mut dupes = String::new();
for property in schema.properties() {
- if keys.insert(property.0) {
- if dupes.is_empty() {
+ if !keys.insert(property.0) {
+ if !dupes.is_empty() {
dupes.push_str(", ");
}
dupes.push_str(property.0);
--
2.20.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-30 11:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30 11:36 [pbs-devel] applied: [PATCH proxmox-backup] verify-api: fix allOf duplicates check Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox