Skip to content

Python: added operationid validation in openapi spec #12551

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sshandilya1991
Copy link

@sshandilya1991 sshandilya1991 commented Jun 20, 2025

Description
This PR enforces the presence of an explicit operationId for every operation in the OpenAPI specification. Previously, if operationId was missing, a default value was generated using the path and HTTP method. Now, the parser will raise a PluginInitializationError if operationId is not provided, ensuring that all operations are uniquely and explicitly identified as required by the OpenAPI standard.

Key changes:

Edit:

  • Added more validation for operationId to be unique & throw in case duplicate operationId found while parsing.

@sshandilya1991 sshandilya1991 requested a review from a team as a code owner June 20, 2025 10:18
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jun 20, 2025
@github-actions github-actions bot changed the title added operationid validation in openapi spec Python: added operationid validation in openapi spec Jun 20, 2025
@sshandilya1991
Copy link
Author

trying to address - #12443

@sshandilya1991
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
connectors/openapi_plugin
   openapi_parser.py127992%61, 118, 182, 236, 239, 253–254, 257–258
TOTAL26437452082% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3638 22 💤 0 ❌ 0 🔥 1m 54s ⏱️

Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Bug: OpenAPI plugin function name parsing results in invalid kernel function name
3 participants