I tried with something below, there is no error, but it just not invoke. Did I miss anything when declaring the API? Any help appreciated? Thanks
“post”: {
“operationId”: “http post”,
“summary”: “http post action”,
“requestBody”: {
“content”: {
“application/json”: {
“schema”: {
“$ref”: “#/components/schemas/RunRequest”
}
}
},
“required”: true
}
}
“RunRequest”: {
“title”: “RunRequest”,
“description”: " “,
“type”: “object”,
“properties”: {
“to”: {
“title”: “to number”,
“description”: “send to this number”,
“default”:”+491767355",
“type”: “string”
},
“content”: {
“title”: “content”,
“description”: “send content.”,
“default”:“hello gpt”,
“type”: “string”
}
}
}
1 Like
I was only able to get it to work by not using any $refs in the body… So put the full definition directly in the post instead of referencing a schema.
thanks for the help!
Tried with no refs as below but still not work, mind share yours for my ref.?
“post”: {
“operationId”: “http post”,
“summary”: “http post action”,
“requestBody”: {
“content”: {
“application/json”: {
“schema”: {
“title”: “RunRequest”,
“description”: " ",
“type”: “object”,
“properties”: {
“to”: {
“title”: “to number”,
“description”: “send to this number”,
“default”:“1234”,
“type”: “string”
},
“content”: {
“title”: “content”,
“description”: “send content.”,
“default”:“hello gpt”,
“type”: “string”
}
}
}
}
},
“required”: true
}
}
Having the same issues here. Will be great to see an example of this working.
So I managed to get something working here… I had to delete the action and re-create one. I think it was saving some incorrect config in cache.
Here is an example:
{
“openapi”: “3.1.0”,
“info”: {
“title”: “Text”,
“description”: “Sends text to teams”,
“version”: “v1.0.0”
},
“servers”: [
{
“url”: “<webhook_url>”
}
],
“paths”: {
“/”: {
“post”: {
“description”: “send test to teams”,
“operationId”: “Text”,
“parameters”: ,
“requestBody”: {
“content”: {
“application/json”: {
“schema”: {
“properties”: {
“text”: {
“type”: “string”,
“description”: “Text to be sent in message”
}
},
“type”: “object”,
“required”: [
“text”
],
“title”: “Text”
}
}
}
}
},
}
},
“components”: {
“schemas”: {
“Text”: {
“properties”: {
“text”: {
“type”: “string”,
“description”: “Text to be sent in message”
}
},
“type”: “object”,
“required”: [
“text”
],
“title”: “Message”
}
}
}
}
Schema isn’t used in this case