My setup: a local Windows 11 Pro machine, where I have installed the SQL Server and the database., along with Flask (tried also to generate SSL certificate for it, in order to serve ‘https’ instead of ‘http’ as requested by GPT Builder). Tried a different setup with Ngroke, but cancelled since it’s complicating the environment without merit for now.(ngroke agents become unavailable without any alert, with the free version I’ve tested).
My problem: can not create an Action to insert data into the sql database due the error below.
Import from url: https://127.0.0.1:5002/openapi.yaml
*tried also to add the code directly to the Schema, see below.
** if opening the link in browser, I can see the content (since Flask is running), but page is displayed as non-secure, meaning without https.
Error :
None of the provided servers is under the root origin https://127.0.0.1
In components section, schemas subsection is not an object
Server URL https://127.0.0.1:5002 is not under the root origin https://127.0.0.1; ignoring it
Schema:
openapi: 3.1.0
info:
title: Invoice Data API
version: 1.0.0
servers:
- url: https://127.0.0.1:5002
paths:
/insert-invoice-data:
post:
summary: Insert extracted invoice data into the database
operationId: insertInvoiceData
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
invoice_number:
type: string
date:
type: string
total_amount:
type: number
vendor_details:
type: string
items:
type: array
items:
type: object
properties:
description:
type: string
quantity:
type: integer
price:
type: number
responses:
“200”:
description: Invoice data inserted successfully
“500”:
description: Internal server error
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
security: - ApiKeyAuth: