-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on parsing OpeanAPI spec #12518
Comments
@lotsik Hello! I'm here to help you with any bugs, questions, or contributions you may have. Let's tackle this issue together! The error you're encountering, "invalid schema: cannot access local variable 'parameter' where it is not associated with a value," suggests that there might be an issue with how the OpenAPI schema is being parsed, particularly with the handling of parameters in the request body. In Dify's codebase, the parsing of OpenAPI specifications involves checking for To troubleshoot this issue, you might want to:
If the issue persists, it might be helpful to look into the specific part of the codebase responsible for parsing the OpenAPI schema to identify any potential bugs or areas where the handling of parameters could be improved. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Same error, When I upgraded from v13 to v15, I couldn't save the custom tool open api schema |
Self Checks
Dify version
0.15.0
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
{ "openapi": "3.1.0", "info": { "title": "Tool", "description": "Desc", "version": "1.0.0" }, "servers": [ { "url": "https://example.com" } ], "paths": { "/call": { "post": { "summary": "Execute", "description": "Execute", "operationId": "query", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "query": { "type": "string", "description": "query to execute" } }, "required": ["query"], "title": "Query" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "msg": { "type": "string", "description": "message" } } } } } } } } } }, "components": { "schemas": {}, "parameters": {} } }
invalid schema: invalid schema: cannot access local variable 'parameter' where it is not associated with a value
✔️ Expected Behavior
Succefully safe OpenAPI spec and create external tool
❌ Actual Behavior
Can't create external tool from OpenAPI spec with json object in request body
The text was updated successfully, but these errors were encountered: