Description
In OpenAPI 3.1.0, sibling properties of $ref (except summary and description) in Reference Objects should be ignored (https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object).
However, when dereferencing my 3.1.0 definition with @apidevtools/swagger-parser (v10.1.1), sibling properties in the requestBody schema are not ignored. For example, at
paths -> /customer -> post -> requestBody -> content -> application/json -> schema
in the dereferenced output (see CodeSandbox: https://codesandbox.io/p/sandbox/swagger-ui-forked-f627d8 ), the sibling example and type are being used instead of those in the referenced schema.
Expected: Sibling properties (like example, type) should be ignored, inheriting only from the referenced schema.
Observed: Sibling properties are being processed and taking precedence.
Please do let me know if I misunderstood or missed any Openapi rules here.