Hi !
Working on building a custom gpt that can make a call to an external api. The external api requestes the data to be submitted to it with content type as application/x-www-form-urlencoded
Here’s how my simple OpenAPI spec file (in YAML ) looks like:
openapi: 3.0.1
info:
title: Test HTTP Post
description: Test HTTP Post requests with form submit
version: 1.0.0
servers:
- url: https://kallipr-fake-petstore.free.beeceptor.com/api
description: Example API server
paths:
/data:
post:
operationId: submitFormData
summary: Submit form data
description: Endpoint to submit data using application/x-www-form-urlencoded content type.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
first_name:
description: First name of the user
type: string
last_name:
description: Last name of the user
type: string
responses:
'200':
description: Success response
content:
application/json:
schema:
type: object
properties:
message:
type: string
'400':
description: Bad Request
'401':
description: Unauthorized
While trying the preview - the debug http section shows that this is how it looks like
{
"domain": "kallipr-fake-petstore.free.beeceptor.com",
"method": "post",
"path": "/data",
"operation": "submitFormData",
"operation_hash": "a81858e22c18caacec8090ab9747b404f8b5bece",
"is_consequential": true,
"params": {}
}
I have used this prompt:
Submit test form data with first name as Hello and last name as world
I am using vscode editor for authoring the YAML. OpenAPI extensions say this is a valid YAML and can generate correct http POST requests from inside of vscode.
What am I doing wrong in this YAML for GPT Actions not sending the body?