Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions rust/agama-server/src/server/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,10 @@ async fn get_config(State(state): State<ServerState>) -> ServerResult<Json<Confi
put,
path = "/config",
context_path = "/api/v2",
request_body(content = Value, description = "Configuration to apply."),
responses(
(status = 200, description = "The configuration was replaced. Other operations can be running in background."),
(status = 400, description = "Not possible to replace the configuration.")
),
params(
("config" = Value, description = "Configuration to apply.")
)
)]
async fn put_config(State(state): State<ServerState>, Json(json): Json<Value>) -> ServerResult<()> {
Expand All @@ -232,12 +230,10 @@ async fn put_config(State(state): State<ServerState>, Json(json): Json<Value>) -
patch,
path = "/config",
context_path = "/api/v2",
request_body(content = Patch, description = "Changes in the configuration."),
responses(
(status = 200, description = "The configuration was patched. Other operations can be running in background."),
(status = 400, description = "Not possible to patch the configuration.")
),
params(
("patch" = Patch, description = "Changes in the configuration.")
)
)]
async fn patch_config(
Expand Down Expand Up @@ -410,13 +406,11 @@ async fn get_license(
post,
path = "/action",
context_path = "/api/v2",
request_body(content = Action, description = "Description of the action to run."),
responses(
(status = 200, description = "Action successfully ran."),
(status = 400, description = "Not possible to run the action.", body = Object),
(status = 422, description = "Action blocked by backend state", body = Object)
),
params(
("action" = Action, description = "Description of the action to run."),
)
)]
async fn run_action(
Expand Down
7 changes: 7 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Mar 20 07:54:46 UTC 2026 - Knut Anderssen <kanderssen@suse.com>

- Fix incorrect openAPI parameters (gh#agama-project/agama#3299).
- Do not define params for POST '/api/v2/action'
- Do not define params for PUT and PATCH '/api/v2/config

-------------------------------------------------------------------
Thu Mar 19 21:11:29 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
Loading