# Generating a client from openapi spec?

**URL:** <https://forums.plex.tv/t/generating-a-client-from-openapi-spec/941767>\
**Category:** Dev/API Corner\
**Tags:** pms-api\
**Created:** [August 17, 2026, 8:37pm UTC](https://forums.plex.tv/t/generating-a-client-from-openapi-spec/941767 "2026-08-17T20:37:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clambin](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@clambin](https://forums.plex.tv/u/clambin)\
**Post date:** [August 17, 2026, 8:37pm UTC](https://forums.plex.tv/t/generating-a-client-from-openapi-spec/941767/1 "2026-08-17T20:37:30Z")

</div>

Has anyone tried to generate a client from the published openapi spec? I had to wait for my generator to support openapi v3.1, but it doesn’t work:

```auto
error generating code: error generating code for type definitions: duplicate typename 'MediaContainer' detected, can't auto-rename, please use x-go-name to specify your own name for one of them

```

And indeed, the spec contains two definitions. One called “MediaContainer” (line 48), and one called “mediaContainer” (line 1438).

---

<div class="post-metadata">

**Author:** ![clambin](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@clambin](https://forums.plex.tv/u/clambin)\
**Post date:** [August 18, 2026, 3:20pm UTC](https://forums.plex.tv/t/generating-a-client-from-openapi-spec/941767/2 "2026-08-18T15:20:37Z")

</div>

answering my own question: the spec contains 2 mediaContrainer types: one’s called “MediaContainer” and one’s called “mediaContainer”, which tripped up my code generator.

Already found one bug in the spec: components.schemas.librarySection.properties.hidden is defined as a bool, but the implementation returns an integer.
