From e6474f5f2a923dec19276e8b1591754c5404f135 Mon Sep 17 00:00:00 2001 From: timur <12267899-timur.5@users.noreply.gitlab.com> Date: Sat, 1 Oct 2022 19:11:54 -0300 Subject: [PATCH] Fix API docs generation for map<> and flat_map<> --- libraries/wallet/generate_api_documentation.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/wallet/generate_api_documentation.pl b/libraries/wallet/generate_api_documentation.pl index 3e1b2e06..c1a8bb40 100755 --- a/libraries/wallet/generate_api_documentation.pl +++ b/libraries/wallet/generate_api_documentation.pl @@ -130,8 +130,9 @@ sub explainCType $type =~ s/\s+$/$1/; $type =~ s/\b(u?int(8|16|32|64)_t|int|unsigned)\b/integer/; # spare the user from width and signedness $type =~ s/\bbool\b/boolean/; # they're not C++ people - $type =~ s/^(?:vector|set|flat_set)<(.+)>$/[$1, ...]/; # represent as JSon-like array notation - $type =~ s/^(?:map|flat_map)<(.+)\s*,\s*(.+)>$/{$1 => $2, ...}/; # same for map + $type =~ s/^(?:vector|set|flat_set)<(.+)>$/[$1, ...]/; # represent as JSon-like array notation + $type =~ s/^map<(.+)\s*,\s*(.+)>$/{$1: $2, ...}/; # same for map + $type =~ s/^flat_map<(.+)\s*,\s*(.+)>$/[[$1, $2], ...]/; # same for flat_map $type =~ s/^time_point_sec$/time, e.g. 2021-12-25T14:30:05/; return $type; }