-
Notifications
You must be signed in to change notification settings - Fork 216
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
Kiota will ignore circular reference/anyof/allof property without any warnings #4945
Comments
Hi @SLdragon @maisarissi do you have more context on why you requested stripping the schema of the response? |
The idea behind that request was that Copilot only returns strings (user responses) and do not care about the responses type/object specified by the API. The idea was to shortened the OpenAPI description and just keep what is important to Copilot and AI orquestrator to handle the API call. |
Thanks for clarifying here. So do we want to keep the current behaviour or change it at this point? |
I don't see why we would change it. The "source" OpenAPI is intact, it's just the one leveraged by Copilot that is changed. I think we should follow this path. |
For context in case this was missed this issue was opened by our friends from teams toolkit, and they don't seem to have the same opinion. Can you circle back with them internally to triple check we're all on the same page here please? |
@SLdragon would you mind sharing what could be potential things we might be missing in API Plugins for ignoring the original response object? |
Thanks for all your input. I agree that we can ignore circular references and anyOf/allOf properties. However, we should at least include warnings to inform users that "we have ignored xxx property due to xxx reason." In future releases of the Type B plugin, it will support adaptive cards. Kiota should use the response properties to generate adaptive cards for users in the ai-plugin.json file. For instance, if we ignore anyOf properties in the response, the generated adaptive card will be empty/ or missing some properties, which would cause confusion for users. |
@baywet TTK today offers a way for one to create an apikey/register action so when provisioning, TTK will help with auth registration in TDP to call authenticated APIs. cc: @sebastienlevert |
Now that we are trimming a lot of the things around the OpenAPI, I think we could bring these back. |
To clarify here, what we want here to undo the changes to modify the responses only. |
Yes @andrueastman |
What are you generating using Kiota, clients or plugins?
Kiota plugin
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
None
Describe the bug
When generate API copilot plugin file, the generated result will ignore circular reference/anyof/allof properties inside OpenAPI spec file without any warnings.
Expected behavior
It should show warnings or proper handle these special properties properties
How to reproduce
Below are testing OpenAPI spec file:
OpenAPI spec file with circular reference:
https://github.com/SLdragon/example-openapi-spec/blob/main/circular-reference.yaml
OpenAPI spec file with anyof/allof properties:
https://github.com/SLdragon/example-openapi-spec/blob/main/contain-anyof.json
Open API description file
No response
Kiota Version
1.15.0+98ed4dae66ab4c06cb490b05bf9180db132791b8
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: