feat(settings): improve JSON schema for frontend form rendering#1353
feat(settings): improve JSON schema for frontend form rendering#1353hiitsrob wants to merge 1 commit intorivenmedia:mainfrom
Conversation
- Add human-readable titles to all model classes via ConfigDict
- Debrid: Real-Debrid, Debrid-Link, AllDebrid, Downloaders
- Media Servers: Plex, Jellyfin, Emby, Media Servers (container)
- Content: Overseerr, Plex Watchlist, Listrr, MDBList, Trakt, Content Sources
- Scrapers: Torrentio, Comet, Zilean, MediaFusion, Orionoid, Jackett,
Prowlarr, RARBG, AIOStreams, Scraping (container)
- Other: Filesystem, Database, Indexer, Notifications, Post Processing,
Logging, Streaming, Filter Rules, Library Profile, Subtitles
- Add format: password to all API keys, tokens, and secrets for
automatic input masking in UI
- Add ItemType enum for NotificationsModel.on_item_type to generate
enum constraint in schema (enables checkbox multi-select in UI)
- Fix /schema/keys endpoint to preserve field metadata (title, description,
format, etc.) by using pydantic.create_model instead of TypeAdapter
These changes allow the frontend settings forms to be fully
schema-driven without hardcoded display name mappings.
WalkthroughThis pull request adds configuration metadata to settings models and refactors schema generation. It introduces an ItemType enum for notifications, adds human-readable titles via ConfigDict to 30+ models, marks sensitive fields with password formatting in the JSON schema, expands DownloadersModel with debrid service configurations, and replaces manual schema construction with Pydantic's create_model for better metadata preservation in the /schema/keys endpoint. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The docstring coverage failed check seems out of scope of this PR. I think it might be including generated code. @dreulavelle do you know if there's a way to configure this? I don't want to start adding docstrings just for the sake of getting the check to pass. |
Pull Request Check List
Resolves: #1352
Description:
These changes allow the frontend settings forms to be fully schema-driven without hardcoded display name mappings.
Summary by CodeRabbit
Release Notes
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.