NOTE: this will also be affecting ApiDOM OpenAPI 3.0.x dereferencing. Another issues needs to be create for ApiDOM repo. ### Content & configuration <!-- Provide us with a way to see what you're seeing, so that we can fix your issue. --> Swagger/OpenAPI definition: ```yaml openapi: 3.1.0 components: schemas: First: allOf: - $ref: '#/components/schemas/Second' Second: allOf: - $ref: '#/components/schemas/Third' Third: allOf: - $ref: '#/components/schemas/Second' ``` ### Describe the bug you're encountering <!-- A clear and concise description of what the bug is. --> Resolving a subtree or the entire definition will cause an error ```TypeError: Elements in allOf must be objects```. ### To reproduce... Steps to reproduce the behavior: 1. Go to https://editor-next.swagger.io/ 2. Paste the definition 3. Open any of the schemas 4. See the error ### Screenshots <!-- If applicable, add screenshots to help explain your problem. --> The result of opening `Second` and then `Third` schema: <img width="838" alt="Image" src="https://github.com/user-attachments/assets/fed6d567-db0d-463f-beb6-86ec1753ed57" />