influxdata / influxdata/iot-api-python
The argument `authorization` in `create_authorization` needs to use a keyword
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 28
- Fork
- 10
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
In `api/devices.py#162` the statement...
```
request = authorization_api.create_authorization(authorization)
```
should be
```
request = authorization_api.create_authorization(authorization=authorization)
```
This is related to.
* https://github.com/influxdata/influxdb-client-python/pull/682
* https://github.com/influxdata/influxdb-client-python/pull/680
* https://github.com/influxdata/docs-v2/pull/5701
Note that on clicking the _Auth_ link in the flask UI, the tutorial application is now returning...
```
ApiException
influxdb_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.11', 'X-Platform-Error-Code': 'invalid', 'Date': 'Wed, 04 Dec 2024 13:04:14 GMT', 'Content-Length': '163'})
HTTP response body: {
"code": "invalid",
"message": "invalid json structure: json: cannot unmarshal object into Go struct field postAuthorizationRequest.orgID of type platform.ID"
}
```
The example here is causing confusion for some users.
I tried to push a branch with this change to create a PR, however I do not have write permissions to this repository.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu tại api/devices.py#162 và kiểm tra lời gọi create_authorization trong luồng hướng dẫn Flask. Cập nhật cách sử dụng các đối số để khớp với dạng từ khóa được issue yêu cầu, sau đó thử liên kết Auth và xác nhận rằng nó không còn trả về 400 ApiException đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- api, backend
- Loại issue
- Lỗi
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 55/100