-
Notifications
You must be signed in to change notification settings - Fork 204
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
bug report: SpecParser.generate-failed when using OpenAPI specification with 'schema' #12731
Comments
Hi, @benedikt-udg , thanks for your feedback, this is a bug and have already been fixed in dev branch, and will be publish in next release. For quick workaround, you can update your spec as below, and then revert changes after successful scaffolding:
openapi: 3.0.3
info:
title: Basic Form Submission API
version: 1.0.0
servers:
- url: https://api.example.com/v1
paths:
/submit-form:
post:
summary: Submit a form
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The name of the user
required:
- name
responses:
'200':
description: Form submitted successfully
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Form submitted successfully! |
I can confirm that this workaround works. However, from the first look of it, after I deploy Copilot won't call the API plugin if it has |
Hi @benedikt-udg, thanks for the information. Could you please check if the API parameters are being called correctly from your backend? |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Due to lack of details for further investigation, we will archive the issue for now. In case you still have following-up questions on this issue, please always feel free to reopen the issue by clicking ‘reopen issue’ button below the comment box. We will get back to you as soon as possible. |
Describe the bug
When trying to add an API plugin using an OpenAI specification that contains a 'schema' element, the import of said specification file fails with the following error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The API plugin code should be generated without error.
VS Code Extension Information (please complete the following information):
The text was updated successfully, but these errors were encountered: