Hi,
The functionality you are looking for does not currently exist, and it is a Swagger/OAS limitation. I’m attaching a link below for a GitHub OAS ticket about the exact functionality you are looking for. The ticket offers some insight into the difficulties/challenges of getting this feature added to the OAS standard. Towards the bottom of the ticket, they offer some work arounds that you can add to your workflow to resolve these issues.
https://github.com/OAI/OpenAPI-Specification/issues/256
Hope this help!
Alex