Implementing enus is jsonschema utilities
This commit is contained in:
@@ -162,6 +162,14 @@ export class JsonschemasService {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else if (this.is_enum(resource)) {
|
||||
for (const ref of resource.allOf!) {
|
||||
// @ts-ignore
|
||||
if (this.has_descendant(ref, property_name)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
throw new Error("Jsonschema format not implemented in property finder");
|
||||
return false;
|
||||
@@ -186,6 +194,14 @@ export class JsonschemasService {
|
||||
return this.get_descendant(ref, property_name);
|
||||
}
|
||||
}
|
||||
} else if (this.is_enum(resource)) {
|
||||
for (const ref of resource.allOf!) {
|
||||
// @ts-ignore
|
||||
if (this.has_descendant(ref, property_name)) {
|
||||
// @ts-ignore
|
||||
return this.get_descendant(ref, property_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new Error("property not found or Jsonschema format not implemented");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user