Reorganize OpenAPI schema properties for consistency#207
Reorganize OpenAPI schema properties for consistency#207
Conversation
Reorder properties in 15 OpenAPI schema files to match the attribute order used in the markdown documentation JSON examples. This makes it easier to verify that both sources contain identical properties and improves consistency across the project. Affected schemas: AlbumID3, AlbumInfo, Artist, ArtistID3, ArtistInfo, ArtistInfo2, Bookmark, Child, Directory, Genre, JukeboxStatus, Lyrics, Playlist, Share, User https://claude.ai/code/session_015LLNEbErYFkRrZvQZ3NMoV
✅ Deploy Preview for opensubsonic ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR reorganizes property ordering across multiple OpenAPI schema JSON files to make field layout more consistent and readable (referencing #206), plus a few formatting-normalization tweaks (e.g., allOf indentation, EOF newlines).
Changes:
- Reordered
propertiesin many schemas to group related fields and apply a consistent hierarchy. - Normalized some JSON formatting (notably
allOfformatting and spacing) and ensured trailing newlines. - Minor reorganizations within complex schemas (notably
Child.json) to group rating/review/video/transcoding fields.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi/schemas/AlbumID3.json | Reordered core album fields and reformatted allOf blocks. |
| openapi/schemas/AlbumInfo.json | Moved lastFmUrl after image URLs. |
| openapi/schemas/Artist.json | Reordered starred before artistImageUrl. |
| openapi/schemas/ArtistID3.json | Moved artistImageUrl after albumCount. |
| openapi/schemas/ArtistInfo.json | Moved lastFmUrl after image URLs. |
| openapi/schemas/ArtistInfo2.json | Moved lastFmUrl after image URLs. |
| openapi/schemas/Bookmark.json | Moved entry earlier; reformatted allOf usage. |
| openapi/schemas/Child.json | Significant property regrouping; formatting normalization; moved rating/video/transcoding-related fields later. |
| openapi/schemas/Directory.json | Moved child before parent, moved playCount later. |
| openapi/schemas/Genre.json | Moved value after count fields. |
| openapi/schemas/JukeboxStatus.json | Moved position before volume. |
| openapi/schemas/Lyrics.json | Moved value after artist/title. |
| openapi/schemas/Playlist.json | Grouped created/changed; repositioned readonly/cache/comment-related fields. |
| openapi/schemas/Share.json | Moved expires/lastVisited after entry. |
| openapi/schemas/User.json | Moved folder to the beginning and maxBitRate near other capability flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The arrangement of child in the doc and table is out of order and date I think child spec here is more correct so that's a todo to update the examples and doc tables on the responses path after this |
- Child.json: "played" refers to media, not album - AlbumID3.json: "starred" means starred/favorited, not added - Share.json: fix grammar "A list of shares"
|
@deluan if you want i can generate a diff instead of going through all these comments one at a time. which is a bit much for this. Few things i noticed though. Spec, vs output example, vs element list. in that conflict who is the winner? If we focus on the spec first and then update docs and examples should we make sure that required elements are first followed by optional? Then with OS elements should we append them to the bottom of the response unless required? |
|
I'm fixing the discrepancies now, byt comparing with the OG Subsonic docs in: |
The original Subsonic XSD and OpenSubsonic docs both use "gain" (float), not "volume" (integer). Fix the field name and change type from integer to number to match the 0.0-1.0 float range.
|
There are some errors in the OpenAPI spec. Ex:
I'm fixing those based on the original XSD spec. |
The original Subsonic XSD defines AverageRating as xs:double with minInclusive=1.0, and the description already says "[1.0-5.0]". Directory and Artist schemas already use minimum: 1; only Child had the incorrect minimum: 0.
I can ask Claude to fix this as well, as part of this. Let me know. |
|
That would be a huge help. examples aren't a huge one but the element tables matching the spec means they're consistent. I'll keep reviewing here then if claude can do that |
Aligns the documentation table with the Child.json schema ordering. Also fixes "played" description from "album" to "media".
The email field is defined in the original Subsonic XSD and was already present in the doc examples, but was missing from both the OpenAPI schema and the doc table.
Summary
This PR reorganizes properties across multiple OpenAPI schema files to establish a consistent ordering convention. Properties are reordered to group related fields together and follow a logical hierarchy, improving schema readability and maintainability.
Refer to #206
Key Changes
Schema Property Reordering
lastFmUrlto end after image URLsstarredbeforeartistImageUrlartistImageUrlafteralbumCountlastFmUrlto end after image URLsentryproperty to beginning before positionstarredandplayedearlier, grouped rating/review fields together, moved video-specific and transcoding properties to endchildarray beforeparent, movedplayCountto endpositionbeforevolumevalueto end after artist/titlefolderto beginning, movedmaxBitRatebefore videoConversionRoleFormatting Improvements
allOfreferences)Implementation Details