Skip to content
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

.Net: Add support for OpenAPI parameters defined with schema but without a type #10682

Merged

Conversation

SergeyMenshykh
Copy link
Member

Motivation, Context and Description

Currently, the SK OpenAPI functionality supports operations with parameters defined by a schema that has a type property. If this property is not provided, which can happen if the schema is described using the anyOf, allOf, or oneOf keywords, the execution of the operation with such parameters fails.

This PR relaxes the OpenAPI parameters validation/conversion functionality by allowing parameters with no type property that has a valid schema or no schema at all.

Fixes the "System.NotSupportedException: 'Unexpected type '' of parameter 'lat' with argument '37.7749'.'" mentioned in this issue: #10548

@SergeyMenshykh SergeyMenshykh added .NET Issue or Pull requests regarding .NET code openapi Issues related to the OpenAPI function importer labels Feb 25, 2025
@SergeyMenshykh SergeyMenshykh self-assigned this Feb 25, 2025
@SergeyMenshykh SergeyMenshykh requested a review from a team as a code owner February 25, 2025 18:09
@SergeyMenshykh SergeyMenshykh added this pull request to the merge queue Feb 25, 2025
Merged via the queue into microsoft:main with commit bd22ea3 Feb 25, 2025
19 checks passed
@SergeyMenshykh SergeyMenshykh deleted the support-parameters-with-no-types branch February 25, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code openapi Issues related to the OpenAPI function importer
Projects
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

3 participants