API schema case type inconsistancies #5287

Closed
opened 2026-02-20 06:11:52 -05:00 by deekerman · 0 comments
Owner

Originally created by @CPU-Blanc on GitHub (Nov 17, 2024).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

I've been working with the API lately in Rust and came across some issues with some of the API schema not being consistent with what case type they are using. For the most part, all fields are using camelCase, however, I have found in QueueResource, the fields timeleft and sizeleft are simply all lowercase. This causes issues when trying to deserialise the data into a Rust struct as it is expecting camel case.

Expected Behavior

Case types across the API/schema should be consistent: ie all camelCase

Steps To Reproduce

  1. GET request to /api/v3/queue while items are there
  2. Observe fields timeleft & sizeleft are not camel case whereas all other fields are in the response body

Environment

- OS: Ubuntu-Server 24.04
- Sonarr: 4.0.10.2544
- Docker Install: Yes
- Using Reverse Proxy: Yes
- Browser: Firefox 132.0.2
- Database: Sqlite 3.45.3

What branch are you running?

Main

Trace Logs?

N/A

Anything else?

Logs from the http response from GET to /api/v3/queue, indicating sizeleft is lowercase, whereas all others are camel. timeleft appears to also be effected looking at the API docs
image

Originally created by @CPU-Blanc on GitHub (Nov 17, 2024). ### Is there an existing issue for this? - [X] I have searched the existing open and closed issues ### Current Behavior I've been working with the API lately in Rust and came across some issues with some of the API schema not being consistent with what case type they are using. For the most part, all fields are using camelCase, however, I have found in `QueueResource`, the fields `timeleft` and `sizeleft` are simply all lowercase. This causes issues when trying to deserialise the data into a Rust struct as it is expecting camel case. ### Expected Behavior Case types across the API/schema should be consistent: ie all camelCase ### Steps To Reproduce 1. `GET` request to `/api/v3/queue` while items are there 2. Observe fields `timeleft` & `sizeleft` are not camel case whereas all other fields are in the response body ### Environment ```markdown - OS: Ubuntu-Server 24.04 - Sonarr: 4.0.10.2544 - Docker Install: Yes - Using Reverse Proxy: Yes - Browser: Firefox 132.0.2 - Database: Sqlite 3.45.3 ``` ### What branch are you running? Main ### Trace Logs? N/A ### Anything else? Logs from the http response from `GET` to `/api/v3/queue`, indicating `sizeleft` is lowercase, whereas all others are camel. `timeleft` appears to also be effected looking at the API docs ![image](https://github.com/user-attachments/assets/004094b5-c94e-4168-aecd-006e6c67f16a)
deekerman 2026-02-20 06:11:52 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Sonarr#5287
No description provided.