Skip to content

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

@eli-bl

Description

@eli-bl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions