From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] verify-api: fix allOf duplicates check
Date: Wed, 30 Dec 2020 12:36:23 +0100 [thread overview]
Message-ID: <20201230113623.431025-1-f.gruenbichler@proxmox.com> (raw)
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
reply other threads:[~2020-12-30 11:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201230113623.431025-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=w.bumiller@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox