Custom GPTs Action: OpenAPI 3.0 specification limited support (oneOf/anyOf/allOf)

Hey y’all,

I’m writing an OpenAPI/Swagger spec for my custom GPTs action, and it looks like not all features of OpenAPI 3.0 spec are supported. Specifically, I’m referring to oneOf, anyOf and allOf

Is it documented somewhere? Are there more OpenAPI spec features that are not supported?

2 Likes

Welcome to the forum!

Can you paste the link as text inside of quotes and then I can paste it into your first post.

1 Like

https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/

1 Like

@McBobby I’m also eager to find documentation on this topic.

Question, did you uncover this limitation through trial and error?

1 Like

Hey there,

i have the exact same problem. I tried different schemas and i am getting an “Internal Error” message when my schema is pasted in the input.

I also have a different, but similar issue related to oneOf/anyOf/allOf:

When i have an array that has a “oneOf”-field, i am able to save the action in the GPT. But when the action is being executed the json is invalid.
Here is an example:

"Page": {
                "type": "object",
                "properties": {
                    "path": {
                        "type": "string",
                        "description": "The path of the page in the website"
                    },
                    "title": {
                        "type": "string",
                        "description": "The title of the page. Will be shown in the browser-tab"
                    },
                    "sections": {
                        "type": "array",
                        "items": {
                            "oneOf": [
                                {
                                    "$ref": "#/components/schemas/DefaultSection"
                                },
                                {
                                    "$ref": "#/components/schemas/HeroSection"
                                },
                                {
                                    "$ref": "#/components/schemas/FindUsSection"
                                },
                                {
                                    "$ref": "#/components/schemas/ContactSection"
                                },
                                {
                                    "$ref": "#/components/schemas/FeatureSection"
                                }
                            ]
                        },
                        "minItems": 3
                    }
                },
                "required": [
                    "path",
                    "title",
                    "sections"
                ]
            }

The properties of the referenced objects (in my case “DefaultSection”, “HeroSection”, etc.) are not created in the resulting json.

Would be great if there is some solution as its very time costly to debug this and having a shaky api action.

Cheers

1 Like

I think the problem is that $ref is not supported.

That’s why I am using redoc’s CLI to produce “dereferenced” OpenAPI bundles.

Curious on what url is being used here. I would not mind trying to help and solve this.