I’m getting an error related to YAML, but the YAML file is there. Does anyone have any idea about this issue?
You have to be really exact. It’s not forgiving. Copy the example from the website examples and then slowly change. I believe this error is related to parsing. Can you post your json and yaml?
Thank you so much for helping me out. I’ve copied the JSON and yaml.
json:
{
“schema_version”: “v1”,
“name_for_human”: “My plugin”,
“name_for_model”: “My plugin”,
“description_for_human”: “My plugin”,
“description_for_model”: “My plugin”,
“auth”: {
“type”: “none”
},
“api”: {
“type”: “openapi”,
“url”: “https://myurl.com/.well-known/openapi.yaml”,
“is_user_authenticated”: false
},
“logo_url”: “https://myurl.com/Logo.png”,
“contact_email”: “support@example.com”,
“legal_info_url”: “http://www.example.com/legal”
}
yaml:
openapi: 3.0.2
info:
title: my plugin
description: my plugin.
version: 1.0.0
servers:
- url: https://api.myurl.com
paths:
/my-plugin:
post:
operationId: my plugin
summary: my plugin
requestBody:
content:
application/json:
schema:
type: object
properties:
text:
type: string
description: my plugin
responses:
“200”:
description: OK
content:
application/json:
schema:
type: object
properties:
my plugin:
type: string
description: my plugin
just making sure, the yaml link in you json, does work?
have you tried using the example json/yaml?
I didn’t fully understand how to test it, what kind of example should I try to experiment with?
Based on your screenshot, looks like ChatGPT just can’t locate your openapi.yaml
file.
Assuming the json and yaml you posted above are your actual code, you’ll have to change “url”: “https://myurl.com/.well-known/openapi.yaml 1”
to the url where your openapi.yaml
file is hosted.
but is it being served? Can you see the yaml file in your browser if you go to the link in your json?
I’ve discovered a (painful) way to debug yaml if you use google.
Open both chatGPT debug and google developer tools.
in chatGPT debug click ‘refresh plugin’
if you have a syntax error, you will see a nice red error line in the developer tools window. You can use that to get to the javascript line throwing the error.
from there, it takes some patience, but you can set breakpoints and click refresh plugin over and over, and eventually get to a line of javascript that actually contains the parse error. In my case it was on a yaml line solely consisting of a single tab that for some reason emacs metaX-untabify didn’t remove.
There are probably easier ways to check syntax, I’m sure…