Hello!
I really don’t understand how to make my code work as “action” in my GPT . The call I have created is first created through Postman. I’ve managed to make the correct call in Swaggereditor as well. When I try to paste the code in “actions” for my gpt, I get an error message. I don’t know how to get the TenantName : value
in a header?
The worked code in Swagger is "
- openapi: 3.1.0
- info:
- title:My API
- description: fjkhf
- version: ‘1.0.0’
- servers:
-
- url: https://myserver
- paths:
- /CreateDocument:
-
post:
-
summary: Skapa ett nytt dokument
-
operationId: createDocument
-
requestBody:
-
required: true
-
content:
-
application/json:
-
schema:
-
type: object
-
properties:
-
CategoryNo:
-
type: integer
-
example: 14
-
IndexDataItems:
-
type: array
-
items:
-
type: object
-
properties:
-
StringIndexData:
-
type: object
-
properties:
-
FieldNo:
-
type: integer
-
DataValue:
-
type: string
-
FieldName:
-
type: string
-
required:
-
- CategoryNo
-
- IndexDataItems
-
example:
-
CategoryNo: 14
-
IndexDataItems:
-
- StringIndexData:
-
FieldNo: 300
-
DataValue: "Förbättringsförslag/Avvikelse"
-
FieldName: "rendetyp"
-
- StringIndexData:
-
FieldNo: 301
-
DataValue: "Kvalitet"
-
FieldName: "TWF287"
-
- StringIndexData:
-
FieldNo: 303
-
DataValue: "LG-Teknik"
-
FieldName: "TWF283"
-
- StringIndexData:
-
FieldNo: 308
-
DataValue: "user.name"
-
FieldName: "TWF288"
-
- StringIndexData:
-
FieldNo: 302
-
DataValue: "Här skriver jag min avvikelse..."
-
FieldName: "TWF298"
-
CheckInComments: "Ny ärendehantering registrering"
-
responses:
-
'200':
-
description: Dokument skapat framgångsrikt
-
content:
-
application/json:
-
schema:
-
type: object
-
properties:
-
documentId:
-
type: string
-
example: "123456"
-
'400':
-
description: Felaktig begäran
-
'401':
-
description: Obehörig
-
security:
-
- basicAuth: []
-
parameters:
-
- name: TenantName
-
in: header
-
required: true
-
schema:
-
type: string
-
example: MYTENANT
- components:
- securitySchemes:
-
basicAuth:
-
type: http
-
scheme: basic
- "
The result of my “actions” is
" In components section, schemas subsection is not an object
In path /CreateDocument, method post, operationId createDocument, parameter TenantName has location header; ignoring"
Should I choose another method for “Authentication” to be able to send with “TenantName : mytenantName” in the header? Or how should I doPreformatted text