.Net Suggestion - Support "include list" for OpenApiFunctionExecutionParameters
#10514
Labels
api_proposal
Issues tagged with this label propose a change to the public API surface
experimental
Associated with an experimental feature
function_calling
.NET
Issue or Pull requests regarding .NET code
openapi
Issues related to the OpenAPI function importer
sk team issue
A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
OpenApiFunctionExecutionParameters supports the ability to exclude specified API from the overall specification. This makes sense since the surface for an Open API may be quite large (huge even!).
The thing is, as an API might grow anything not excluded is included by default. This is a classic design bug: logic based on disallowed state instead of allowed state. This design bug is often associated with a security context and in this case, it could very well result in a security exploit.
Since
OpenApiFunctionExecutionParameters.OperationsToExclude
is marked experimental (SKEXP0040), considering this prior to feature graduation may be prudent.Instead of
OperationsToExclude
, supportingOperationsToInclude
could provide developers with the precision that aligns with the most common intent.OperationsToExclude
could then either be deprecated or removed. IfOperationsToExclude
&OperationsToInclude
were to exist side-by-side, then the inclusion list would have logical priority. Throwing an exception of both were defined may be the most clear contract. If neither are defined, then the entire API would be included in the spec.As a work-around, a developer can define the JSON API spec as a resource and edit it as they desire; however, this result in a brittle pattern where parameter changes to included api wouldn't be reflected dynamically.
The text was updated successfully, but these errors were encountered: