openapi-generators/openapi-python-client

allOf fails if it references a type that also uses allOf with just single item

eli-bl opened this issue · 0 comments

eli-bl commented

Describe the bug

Conditions:

  • Schema A is a type with any definition.
  • Schema B contains only an allOf with a single element referencing Schema A.
  • Schema C contains an allOf that 1. references Schema B and 2. adds a property.

Expected behavior:

  • Spec is valid. Schema B should be treated as exactly equivalent to Schema A (in other words, C becomes an extension of A with an extra property).

Observed behavior:

  • Parsing fails. Error message is "Unable to process schema ".

OpenAPI Spec File
https://gist.github.com/eli-bl/8f5c7d1d872d9fda5379fa6370dab6a8

Desktop (please complete the following information):

  • OS: macOS 14.5
  • Python Version: 3.8.15
  • openapi-python-client version 0.21.2