manta_shared/types/api/mod.rs
1//! Single-namespace API types shared between `manta-cli` (Serialize
2//! side) and `manta-server` (Deserialize side).
3//!
4//! Each submodule owns one resource end-to-end: HTTP request/response
5//! bodies, query-string structs, and CLI-built parameter structs all
6//! sit next to each other rather than being split across parallel
7//! `wire/` and `params/` namespaces. Cross-cutting query and response
8//! shapes live in [`queries`] and [`responses`].
9//!
10//! Convention:
11//!
12//! - Owned types (`String`, `Vec<String>`) throughout. The CLI pays a
13//! small allocation cost on the outbound build; in exchange there is
14//! exactly one type to keep in sync.
15//! - Derives are `#[derive(Serialize, Deserialize, ToSchema)]` (or
16//! `IntoParams` for query strings). The server uses `Deserialize` +
17//! the utoipa derives for OpenAPI; the CLI uses `Serialize`.
18//! - Field-level docs describe wire semantics. They show up in both
19//! the OpenAPI spec and the rustdoc the CLI consumes.
20//!
21//! Types re-exported from `manta-backend-dispatcher` (response DTOs
22//! owned by upstream crates) live in [`super::dto`], which is kept
23//! separate because it serves a different concern: types we don't own.
24
25/// Aggregate summary of CFS configurations + sessions + BOS templates +
26/// IMS images flattened into image-centric rows
27/// (`/api/v1/analysis/images`).
28pub mod analysis;
29/// Boot-parameter request/response bodies (`/api/v1/boot-config`,
30/// `/api/v1/boot-parameters`).
31pub mod boot_parameters;
32/// CLI-built params for `GET /clusters`.
33pub mod cluster;
34/// CLI-built params for `GET /configurations`.
35pub mod configuration;
36/// Wire shape for the per-row configuration-deletion-safety verdict
37/// returned by `/api/v1/configurations`.
38pub mod configuration_analysis;
39/// HSM group request/response bodies (`/api/v1/groups`,
40/// `/api/v1/groups/{name}/members`).
41pub mod group;
42/// CLI-built params for `GET /groups/hardware` and the
43/// `/hardware-nodes-list` family.
44pub mod hardware;
45/// Wire types for the `POST/DELETE /api/v1/hardware-clusters/{target}/*`
46/// endpoints.
47pub mod hw_cluster;
48/// CLI-built params for `GET /images`.
49pub mod image;
50/// Kernel-parameter request/response bodies
51/// (`/api/v1/kernel-parameters/*`). The internal `KernelParamOperation`
52/// enum is server-only and lives in `service::kernel_parameters`.
53pub mod kernel_parameters;
54/// Wire types for the `POST /api/v1/migrate/*` endpoints.
55pub mod migrate;
56/// Node request/response bodies (`/api/v1/nodes`).
57pub mod node;
58/// Power request/response bodies (`/api/v1/power`).
59pub mod power;
60/// Shared `IntoParams` query-string structs for every non-trivial GET
61/// and DELETE endpoint.
62pub mod queries;
63/// CLI-built params for `GET/POST/PUT /redfish-endpoints`.
64pub mod redfish_endpoints;
65/// Tiny response shapes (`{ "created": true }`, `{ "id": "..." }`) so
66/// the OpenAPI spec carries real types instead of `serde_json::Value`.
67pub mod responses;
68/// SAT-file element-apply request/response bodies (`POST
69/// /api/v1/sat-file/*`) and CLI-built params for the whole-file
70/// pass-through.
71pub mod sat_file;
72/// CFS session request/response bodies (`/api/v1/sessions`).
73pub mod session;
74/// BOS session-template request/response bodies (`/api/v1/templates`,
75/// `/api/v1/templates/{name}/sessions`).
76pub mod template;