Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse schema definition with anyOf/allOf within one another #868

Open
ajoga opened this issue Oct 5, 2023 · 0 comments
Open

Comments

@ajoga
Copy link

ajoga commented Oct 5, 2023

Describe the bug

Schema definition in components of combined schemas are failing to be parsed, with the following error:

Unable to parse this part of your OpenAPI document: : Invalid property in union /components/schemas/composite_object

Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, type=None, allOf=[Reference(ref='#/components/schemas/simple_object1'), Reference(ref='#/components/schemas/simple_object2')], oneOf=[], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default=None, nullable=False, discriminator=None, readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None)

Surprisingly, combined schemas are correctly parsed when defined in paths : this is the uncommented part in the gist.

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

Desktop (please complete the following information):

  • OS: Amazon Linux 2
  • Python Version: 3.11.5
  • openapi-python-client version 0.15.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant