openapi-generators / openapi-generators/openapi-python-client

parameter from the `components/parameters` section makes openapi-python-client crash

Open
#1,194 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
293
Avg merge
34m
Merged PRs (30d)
1

Description

Describe the bug
While generating a client for my openapi.json file, the script crashes with internal errors.

The problem seems to be related to a parameter defined in my component/parameters section. When i comment out this part of my openapi spec. The client can be generated without errors.

"components": {
    "parameters": {
        "macAddress": {
            "name": "macAddress",
            "in": "path",
            "required": true,
            "schema": {
                "$ref": "#/components/schemas/MacAddress"
            },
            "description": "The MAC address of the dongle.\n"
        }
    }
}

OpenAPI Spec File.

openapi.json

Desktop (please complete the following information):

  • OS: Ubuntu 24.04.1 LTS
  • Python Version: 3.12.3
  • openapi-python-client version: 0.22.0

Additional context

The full output of the crash output.log.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash with the attached openapi.json and review output.log alongside the component parameter definition. Trace the generator path handling referenced parameters, then confirm that the same specification generates a client without internal errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.