eWaterCycle / eWaterCycle/remotebmi

Can't use `set_value` or `set_value_at_indices` in Python server implementation.

Đang mở
#52 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug Python
Ngôn ngữ chính
Julia
Star
0
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

To reproduce; enable the Swagger UI and try to set a value for a variable. Error will be;

`set_value() is missing 1 required positional argument: 'src'`

The problem is that the body of the request is passed by connexion to the function as the kwarg "body".

Claude's explanation:

> Connexion 3.x calls operation.body_name() → always returns "body" (since the spec has no x-body-name extension)
> It then checks if "body" in function_arguments — but set_value's arguments are ["name", "src"]
> So connexion skips body injection entirely and calls set_value(name=...) without src
> This cannot be influenced from the client side — the body is discarded before the Python function is even called. The same bug affects update_until (until vs body), get_value_at_indices (indices vs body), and set_value_at_indices (indices/values vs body). initialize works because it already uses body.
>
> The only real fix is server-side: rename the parameter from src to body in the function (one character change), or add x-body-name: src to the spec.
>

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.