OpenAPI schema for /api/v3/series/lookup endpoint missing return type #5313

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

Originally created by @hrishabhn on GitHub (Dec 1, 2024).

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Current Behavior

In the OpenAPI schema, the /api/v3/series/lookup endpoint has no return type marked. However, when accessing the endpoint, returned data appears to be of type [SeriesResource].

{
    "/api/v3/series/lookup": {
        "get": {
            "tags": ["SeriesLookup"],
            "parameters": [
                {
                    "name": "term",
                    "in": "query",
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "responses": {
                "200": {
                    "description": "OK"
                }
            }
        }
    }
}

Link to schema
Link to docs (generated from schema)

Expected Behavior

{
    "/api/v3/series/lookup": {
        "get": {
            "tags": ["SeriesLookup"],
            "parameters": [
                {
                    "name": "term",
                    "in": "query",
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/SeriesResource"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

Steps To Reproduce

No response

Environment

N/A

What branch are you running?

Main

Trace Logs?

N/A

Anything else?

Sample Response for /api/v3/series/lookup?term=breaking+bad, appears to be of type [SeriesResource].

[
    {
        "title": "Breaking Bad",
        "sortTitle": "breaking bad",
        "status": "ended",
        "ended": true,
        "overview": "When Walter White, a chemistry teacher, is diagnosed with Stage III cancer and given a prognosis of two years left to live, he chooses to enter a dangerous world of drugs and crime with the intent to secure his family's financial security.",
        "network": "AMC",
        "airTime": "21:00",
        "images": [
            {
                "coverType": "banner",
                "url": "/sonarr/MediaCoverProxy/11d8491574928723a7cb4ad413a946048a3b5fa113294a9ad48bb9888919ad4d/81189-g21.jpg",
                "remoteUrl": "https://artworks.thetvdb.com/banners/graphical/81189-g21.jpg"
            },
            {
                "coverType": "poster",
                "url": "/sonarr/MediaCoverProxy/654177c109680f7222c3b91329075525bd3d06ea3aef40b45116019d8d7c1b72/81189-10.jpg",
                "remoteUrl": "https://artworks.thetvdb.com/banners/posters/81189-10.jpg"
            },
            {
                "coverType": "fanart",
                "url": "/sonarr/MediaCoverProxy/fedaca230f901f9e74724eba0d61d9e33703c1bfd3ef8f5685412cd2e699909e/81189-21.jpg",
                "remoteUrl": "https://artworks.thetvdb.com/banners/fanart/original/81189-21.jpg"
            },
            {
                "coverType": "clearlogo",
                "url": "/sonarr/MediaCoverProxy/3887baaeb0c812aec8abd1d0a92fd2225df24bde484b341750b4ebfd8e59b348/611b4df33bac5.png",
                "remoteUrl": "https://artworks.thetvdb.com/banners/v4/series/81189/clearlogo/611b4df33bac5.png"
            }
        ],
        "originalLanguage": {
            "id": 1,
            "name": "English"
        },
        "remotePoster": "https://artworks.thetvdb.com/banners/posters/81189-10.jpg",
        "seasons": [
            {
                "seasonNumber": 0,
                "monitored": false
            },
            {
                "seasonNumber": 1,
                "monitored": true
            },
            {
                "seasonNumber": 2,
                "monitored": true
            },
            {
                "seasonNumber": 3,
                "monitored": true
            },
            {
                "seasonNumber": 4,
                "monitored": true
            },
            {
                "seasonNumber": 5,
                "monitored": true
            }
        ],
        "year": 2008,
        "qualityProfileId": 0,
        "seasonFolder": false,
        "monitored": true,
        "monitorNewItems": "all",
        "useSceneNumbering": false,
        "runtime": 48,
        "tvdbId": 81189,
        "tvRageId": 18164,
        "tvMazeId": 169,
        "tmdbId": 1396,
        "firstAired": "2008-01-20T00:00:00Z",
        "lastAired": "2013-09-29T00:00:00Z",
        "seriesType": "standard",
        "cleanTitle": "breakingbad",
        "imdbId": "tt0903747",
        "titleSlug": "breaking-bad",
        "folder": "Breaking Bad",
        "certification": "TV-MA",
        "genres": ["Crime", "Drama", "Thriller", "Western"],
        "tags": [],
        "added": "0001-01-01T00:00:00Z",
        "ratings": {
            "votes": 2170549,
            "value": 9.5
        },
        "statistics": {
            "seasonCount": 5,
            "episodeFileCount": 0,
            "episodeCount": 0,
            "totalEpisodeCount": 0,
            "sizeOnDisk": 0,
            "percentOfEpisodes": 0
        },
        "languageProfileId": 1
    }
]
Originally created by @hrishabhn on GitHub (Dec 1, 2024). ### Is there an existing issue for this? - [x] I have searched the existing open and closed issues ### Current Behavior In the OpenAPI schema, the `/api/v3/series/lookup` endpoint has no return type marked. However, when accessing the endpoint, returned data appears to be of type `[SeriesResource]`. ```json { "/api/v3/series/lookup": { "get": { "tags": ["SeriesLookup"], "parameters": [ { "name": "term", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" } } } } } ``` [Link to schema](https://github.com/Sonarr/Sonarr/blob/8b38ccfb633f59936820d9865f349ca3b1527751/src/Sonarr.Api.V3/openapi.json#L7013) [Link to docs](https://sonarr.tv/docs/api/#/SeriesLookup/get_api_v3_series_lookup) (generated from schema) ### Expected Behavior ```json { "/api/v3/series/lookup": { "get": { "tags": ["SeriesLookup"], "parameters": [ { "name": "term", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SeriesResource" } } } } } } } } } ``` ### Steps To Reproduce _No response_ ### Environment ```markdown N/A ``` ### What branch are you running? Main ### Trace Logs? N/A ### Anything else? Sample Response for `/api/v3/series/lookup?term=breaking+bad`, appears to be of type `[SeriesResource]`. ```json [ { "title": "Breaking Bad", "sortTitle": "breaking bad", "status": "ended", "ended": true, "overview": "When Walter White, a chemistry teacher, is diagnosed with Stage III cancer and given a prognosis of two years left to live, he chooses to enter a dangerous world of drugs and crime with the intent to secure his family's financial security.", "network": "AMC", "airTime": "21:00", "images": [ { "coverType": "banner", "url": "/sonarr/MediaCoverProxy/11d8491574928723a7cb4ad413a946048a3b5fa113294a9ad48bb9888919ad4d/81189-g21.jpg", "remoteUrl": "https://artworks.thetvdb.com/banners/graphical/81189-g21.jpg" }, { "coverType": "poster", "url": "/sonarr/MediaCoverProxy/654177c109680f7222c3b91329075525bd3d06ea3aef40b45116019d8d7c1b72/81189-10.jpg", "remoteUrl": "https://artworks.thetvdb.com/banners/posters/81189-10.jpg" }, { "coverType": "fanart", "url": "/sonarr/MediaCoverProxy/fedaca230f901f9e74724eba0d61d9e33703c1bfd3ef8f5685412cd2e699909e/81189-21.jpg", "remoteUrl": "https://artworks.thetvdb.com/banners/fanart/original/81189-21.jpg" }, { "coverType": "clearlogo", "url": "/sonarr/MediaCoverProxy/3887baaeb0c812aec8abd1d0a92fd2225df24bde484b341750b4ebfd8e59b348/611b4df33bac5.png", "remoteUrl": "https://artworks.thetvdb.com/banners/v4/series/81189/clearlogo/611b4df33bac5.png" } ], "originalLanguage": { "id": 1, "name": "English" }, "remotePoster": "https://artworks.thetvdb.com/banners/posters/81189-10.jpg", "seasons": [ { "seasonNumber": 0, "monitored": false }, { "seasonNumber": 1, "monitored": true }, { "seasonNumber": 2, "monitored": true }, { "seasonNumber": 3, "monitored": true }, { "seasonNumber": 4, "monitored": true }, { "seasonNumber": 5, "monitored": true } ], "year": 2008, "qualityProfileId": 0, "seasonFolder": false, "monitored": true, "monitorNewItems": "all", "useSceneNumbering": false, "runtime": 48, "tvdbId": 81189, "tvRageId": 18164, "tvMazeId": 169, "tmdbId": 1396, "firstAired": "2008-01-20T00:00:00Z", "lastAired": "2013-09-29T00:00:00Z", "seriesType": "standard", "cleanTitle": "breakingbad", "imdbId": "tt0903747", "titleSlug": "breaking-bad", "folder": "Breaking Bad", "certification": "TV-MA", "genres": ["Crime", "Drama", "Thriller", "Western"], "tags": [], "added": "0001-01-01T00:00:00Z", "ratings": { "votes": 2170549, "value": 9.5 }, "statistics": { "seasonCount": 5, "episodeFileCount": 0, "episodeCount": 0, "totalEpisodeCount": 0, "sizeOnDisk": 0, "percentOfEpisodes": 0 }, "languageProfileId": 1 } ] ```
deekerman 2026-02-20 06:12:06 -05:00
  • closed this issue
  • added the
    docs
    label
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#5313
No description provided.