From: Wolfgang Bumiller Date: Tue, 22 Sep 2015 11:45:44 +0000 (+0200) Subject: PodParser: use generate_typetext X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=990b6a1a5bdb97a1c2203375aae8111f2c993168 PodParser: use generate_typetext --- diff --git a/src/PVE/PodParser.pm b/src/PVE/PodParser.pm index 7e31e19..3cb3c56 100644 --- a/src/PVE/PodParser.pm +++ b/src/PVE/PodParser.pm @@ -61,6 +61,11 @@ sub schema_get_type_text { } elsif (defined($phash->{maximum})) { return "$phash->{type} (-N - $phash->{maximum})"; } + } elsif ($phash->{type} eq 'string') { + my $format = $phash->{format}; + if ($format && ref($format) eq 'HASH') { + return PVE::JSONSchema::generate_typetext($format); + } } my $type = $phash->{type} || 'string';