Currently with v5 there are a number of issues in codegen, and in oas, that are preventing us supporting circular references out of the gate. We should improve on this.
Here's an example API definition that fails with codegen: https://api.apis.guru/v2/specs/amazonaws.com/ce/2017-10-25/openapi.json