From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 4/4] api: views: improve API schema definitions
Date: Fri, 10 Apr 2026 16:01:19 +0200 [thread overview]
Message-ID: <20260410140119.338714-5-l.wagner@proxmox.com> (raw)
In-Reply-To: <20260410140119.338714-1-l.wagner@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
server/src/api/config/views.rs | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/server/src/api/config/views.rs b/server/src/api/config/views.rs
index db68da5d..e1da725d 100644
--- a/server/src/api/config/views.rs
+++ b/server/src/api/config/views.rs
@@ -8,7 +8,7 @@ use proxmox_schema::{api, param_bail};
use pdm_api_types::{
views::{ViewConfig, ViewConfigEntry, ViewConfigUpdater, ViewTemplate},
- PRIV_RESOURCE_AUDIT, PRIV_RESOURCE_MODIFY,
+ PRIV_RESOURCE_AUDIT, PRIV_RESOURCE_MODIFY, VIEW_ID_SCHEMA,
};
const VIEW_ROUTER: Router = Router::new()
@@ -30,8 +30,7 @@ pub const ROUTER: Router = Router::new()
description: "List of views.",
type: Array,
items: {
- type: String,
- description: "The name of a view."
+ type: ViewConfig,
},
},
)]
@@ -130,8 +129,7 @@ pub enum DeletableProperty {
input: {
properties: {
id: {
- type: String,
- description: "",
+ schema: VIEW_ID_SCHEMA,
},
view: {
flatten: true,
@@ -215,8 +213,7 @@ pub fn update_view(
input: {
properties: {
id: {
- type: String,
- description: "",
+ schema: VIEW_ID_SCHEMA,
},
digest: {
type: ConfigDigest,
@@ -250,8 +247,7 @@ pub fn remove_view(id: String, digest: Option<ConfigDigest>) -> Result<(), Error
input: {
properties: {
id: {
- type: String,
- description: "",
+ schema: VIEW_ID_SCHEMA,
},
},
},
--
2.47.3
prev parent reply other threads:[~2026-04-10 14:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 14:01 [PATCH datacenter-manager 0/4] views: verify digest, schema improvements Lukas Wagner
2026-04-10 14:01 ` [PATCH datacenter-manager 1/4] api: views: return config digest when retrieving views Lukas Wagner
2026-04-10 14:01 ` [PATCH datacenter-manager 2/4] ui: views: submit config digest when updating a view Lukas Wagner
2026-04-10 14:01 ` [PATCH datacenter-manager 3/4] api: views: run API handlers in proxy process Lukas Wagner
2026-04-10 14:01 ` Lukas Wagner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260410140119.338714-5-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox