openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Unable to process schema when title is ambiguous

Open XmasApple opened this issue 2 months ago • 0 comments

Describe the bug

Unable to process schema /components/schemas/ActualApprovement:

Could not find reference in parsed models or enums

Failure to process schema has resulted in the removal of:
/components/schemas/ActualApprovement

Reference(ref='#/components/schemas/backend__server__src__models__types__approvement__ApprovementStatus')

OpenAPI Spec File A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.

{
  "components": {
    "schemas": {
      "backend__gateways__types__ApprovementStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "suspended",
          "rejected",
          "closed"
        ],
        "title": "ApprovementStatus"
      },
      "backend__server__src__models__types__approvement__ApprovementStatus": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "rejected",
          "cancelled"
        ],
        "title": "ApprovementStatus"
      },
"ActualApprovement": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/backend__server__src__models__types__approvement__ApprovementStatus"
          }
        },
        "type": "object",
        "required": [
          "status",
        ],
        "title": "ActualApprovement"
      },
}}}

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Python Version: 3.9
  • openapi-python-client version 0.27.1

Additional context Add any other context about the problem here.

XmasApple avatar Nov 05 '25 17:11 XmasApple