[Interest] [QtOpenAPI] Unable to compile Jellyfin OpenAPI schema

Alex Shaw alex.shaw.as at gmail.com
Sat Jul 25 21:12:33 CEST 2026


I'm not sure if this is a bug (or if it is, which software it's a bug in),
but I've reached the end of my rope trying to fix this, and it's a hard
blocker for me.

I'm attempting to use the new Qt OpenAPI module to generate the HTTP client
code for Jellyfin using the official OpenAPI schema available here:
https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json
Although qt_add_openapi_client works correctly, the code generated results
in multiple compile-time C++ errors. I narrowed down the problem to being
an issue with circular "allOf" references (for example, the "AlbumArtist"
property of the "RemoteSearchResult" component is an allOf ref to
RemoteSearchResult). I was able to solve those problems with a script that
removes any problematic members in the schema. The remaining errors have
proven much more difficult to patch.

Here's a portion of the Jellyfin OpenAPI schema:
{
  "paths": {
    "/Audio/{itemId}": {
      "get": {
        "parameters": [
          {
            "name": "context",
            "in": "query",
            "description": "Optional. The
MediaBrowser.Model.Dlna.EncodingContext.",
            "schema": {
              "$ref": "#/components/schemas/EncodingContext"
            }
          }
        ]
      }
    }
  }
}

Here's the resulting error:

build/QtOpenAPIClient_autogen/VU62IVP4U3/../../client/audioapi.h:46:5:
error: conflicting declaration ‘const QObject* context’

build/QtOpenAPIClient_autogen/VU62IVP4U3/../../client/audioapi.h:46:5189:
note: previous declaration as ‘const
QtOpenApiCommon::OptionalParameter<QtOpenAPI::EncodingContext>& context’

There are about 10 more errors in the audio and video APIs. They all
involve the same compiler error: a constructor parameter named "context"
I'm not sure if this is a bug with Qt, OpenAPI Generator, the Jellyfin
schema, or something else, but I won't be able to just fix this with a
preprocessor script since I need the audio and video endpoints.

For what it's worth, I tried running openapi-generator-cli directly, but
that just resulted in even more errors.

Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20260725/d040a2a3/attachment.htm>


More information about the Interest mailing list