OpenAPI spec with recursive or circular dependencies

I’m attempting to define a GPT action via an OAS 3.0 spec that has a recursive definition in one of the schemas:

    Person:
      type: object
      properties:
        name:
          type: string
        age:
          type: integer
        children:
          type: array
          items:
            $ref: '#/components/schemas/Person' 

The GPT schema editor is telling me 'Components section contains a circular dependency" but also then failing to parse the remainder of the components leading to additional errors that there are unknown components.

The kicker is, this was working last week but isn’t anymore. Is there a work-around for this, or a way to file a bug report?

8 Likes

You could try contacting support for bug reports, but OpenAI developers don’t monitor this forum

Can confirm I’m getting the same error with my OAS 3.0 spec written in JSON. All "schemas" are defined in "components" as expected.

Components section contains a circular dependency
In context=('paths', '/user', '200', 'response', 'content', 'application/json', 'schema'), reference to unknown component User; using empty schema
...

I’ve run the spec through GPT-4 a few times to confirm it is valid OpenAPI 3.0, and it does indeed appear to be.