[pve-devel] [PATCH docs 1/7] update static files

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Sep 13 11:16:11 CEST 2018


On 9/13/18 11:00 AM, Dietmar Maurer wrote:
> Found the bug myself. We currently simply use the full 'returns' type property. Insead, we can compress that like we do for parameters:
> 
> any objections?
> 
> patch for pve-common:
> 
> diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm
> index ed76863..ebb0de3 100644
> --- a/src/PVE/RESTHandler.pm
> +++ b/src/PVE/RESTHandler.pm
> @@ -141,7 +141,7 @@ sub api_dump_full {
>                     if ($raw_dump) {
>                         $data->{$k} = $d;
>                     } else {
> -                       if ($k eq 'parameters') {
> +                       if ($k eq 'parameters' || $k eq 'returns') {
>                             $data->{$k} = api_clone_schema($d);
>                         } else {
>                             $data->{$k} = ref($d) ? clone($d) : $d;
> 

looks good to me! with this installed I get ~16000 lines less from a previous
update-static and things look OK.




More information about the pve-devel mailing list