Possible bug: application/x-www-form-urlencoded in OpenAPI spec is not handed properly

Hi

I have the following OpenAPI spec:

openapi: 3.0.0
info:
  title: Echo API
  description: This API echoes back the text sent to it, now using JSON data.
  version: 1.0.2
servers:
  - url: https://www.wolframcloud.com
    description: Main server
paths:
  /obj/tamas.simon/Echo:
    post:
      operationId: echoText
      summary: Echoes back the text sent to it.
      x-openai-isConsequential: false
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                str:
                  type: string
              required: # Add this line
                - str # And this line, indicating 'str' is a required property
      responses:
        '200':
          description: A JSON object containing the echoed text
          content:
            application/json:
              schema:
                type: object
                properties:
                  echoedText:
                    type: string
                    description: The echoed text received from the request.

Note that the request should be sent as an HTTP form request with a single string called str in it.
I can successfully test both the specification and the backend in Swagger.
When I try setting this up in a GPT and test from within the GPT Builder or the GPT itself, it fails to send the str… the request body is empty.
(It does handle the x-openai-isConsequential: false properly.)

If I switch to application/json then the request works as expected.

Is there a bug? :beetle:

thanks

2 Likes