verify-api: fix allOf duplicates check
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>
This commit is contained in:
parent
12299b333b
commit
2fb1bdda20
|
@ -46,8 +46,8 @@ fn verify_all_of_schema(schema: &AllOfSchema) -> Result<(), Error> {
|
||||||
let mut keys = HashSet::<&'static str>::new();
|
let mut keys = HashSet::<&'static str>::new();
|
||||||
let mut dupes = String::new();
|
let mut dupes = String::new();
|
||||||
for property in schema.properties() {
|
for property in schema.properties() {
|
||||||
if keys.insert(property.0) {
|
if !keys.insert(property.0) {
|
||||||
if dupes.is_empty() {
|
if !dupes.is_empty() {
|
||||||
dupes.push_str(", ");
|
dupes.push_str(", ");
|
||||||
}
|
}
|
||||||
dupes.push_str(property.0);
|
dupes.push_str(property.0);
|
||||||
|
|
Loading…
Reference in New Issue