]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/PodParser.pm
PodParser: use generate_typetext
[pve-common.git] / src / PVE / PodParser.pm
index 7e31e1957e71c42a542c9ae1eb7ab76eb91b7af1..3cb3c56f0e6dfff9fc295469e929612238375c8c 100644 (file)
@@ -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';