From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pbs-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id AB21D1FF16A
	for <inbox@lore.proxmox.com>; Fri, 30 Aug 2024 13:32:34 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 260B29B9C;
	Fri, 30 Aug 2024 13:33:04 +0200 (CEST)
Date: Fri, 30 Aug 2024 13:33:00 +0200
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>
Message-ID: <vhvkc26olqlgpmdoei4hizh4tyltithfspa5fki7mvb2mmth3g@vsrxsvdx7gfn>
References: <20240809082525.864042-1-d.csapak@proxmox.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <20240809082525.864042-1-d.csapak@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.087 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: [pbs-devel] applied: [PATCH proxmox] router: sort cli properties in
 usage output
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox Backup Server development discussion
 <pbs-devel@lists.proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pbs-devel-bounces@lists.proxmox.com
Sender: "pbs-devel" <pbs-devel-bounces@lists.proxmox.com>

On Fri, Aug 09, 2024 at 10:25:25AM GMT, Dominik Csapak wrote:
> If we don't do this, then properties from a serde flattened struct will
> be positioned at the end of the list, rather than properly sorted with
> the other properties.
> 
> Since the tests also feature non-sorted properties, we have to adapt
> them too.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> i wanted to add tests for the serde flattened structs, but the test
> don't use the api macro, nor serde, so i was not sure how i could
> replicate that. If somebody has an idea for that, please tell, then
> I'll send a v2 or follow up

Those are just `AllOfSchemas` , you'd just have to make 2
`ObjectSchemas` and put them into an `AllOfSchema`.

I do wonder, though, whether we want some way to declare "groups" for
the documentation.
Using a flattened structs might sometimes work, but probably not all the
time. With this applied, flattened structs won't make a difference. But
given that the visible portion of the struct in code doesn't represent
the way it would be grouped anyway, we'd need a separate solution to
declare groups anyway.


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel