Skip to content

fix: correct openapi2mcp mode values to match the ai-mcp-proxy plugin - #301

Merged
equistar22 merged 1 commit into
mainfrom
fix/openapi2mcp-mode-enum
Aug 12, 2026
Merged

fix: correct openapi2mcp mode values to match the ai-mcp-proxy plugin#301
equistar22 merged 1 commit into
mainfrom
fix/openapi2mcp-mode-enum

Conversation

@equistar22

Copy link
Copy Markdown
Contributor

Summary

deck file openapi2mcp --mode accepted and advertised a mode called "conversion" that the ai-mcp-proxy plugin has never actually supported. The plugin's real modes are passthrough-listener, conversion-listener, conversion-only, and listener - conversion isn't one of them.

Full changelog

  • [Fix] openapi2mcp now accepts and validates the plugin's real modes: passthrough-listener, conversion-listener, conversion-only, listener.
  • [Fix] conversion is kept working as a deprecated alias for conversion-only, so existing usage doesn't break.
  • [Fix] ACL settings (acl_attribute_type, access_token_claim_field) are now generated for every listener mode, not just conversion-listener.

Issues resolved

Fixes [Kong/deck#2181] Issue : Kong/deck#2181

Testing

  • Unit tests - updated 2 existing tests that had baked in the old, incorrect mode behavior, and added new tests covering the previously untested modes and the CLI's mode validation
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

The plugin never supported a "conversion" mode - that value was invalid
and produced misleading CLI help output. The real modes are
passthrough-listener, conversion-listener, conversion-only, and listener.
"conversion" is kept working as a deprecated alias for conversion-only so
existing callers don't break.

Also corrects which modes get ACL fields (acl_attribute_type,
access_token_claim_field): every listener mode gets them, not just
conversion-listener as before.

Fixes Kong/deck#2181
@CLAassistant

CLAassistant commented Aug 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.82%. Comparing base (f8d0d2b) to head (b62668f).

Files with missing lines Patch % Lines
cmd/openapi2mcp.go 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #301      +/-   ##
==========================================
- Coverage   65.70%   58.82%   -6.88%     
==========================================
  Files          25       36      +11     
  Lines        3260     3869     +609     
==========================================
+ Hits         2142     2276     +134     
- Misses        905     1380     +475     
  Partials      213      213              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@harshadixit12

Copy link
Copy Markdown
Contributor

LGTM - Thank you for the detailed description, and keeping conversion mode as a deprecated alias!

@equistar22
equistar22 merged commit afc605e into main Aug 12, 2026
5 checks passed
@equistar22
equistar22 deleted the fix/openapi2mcp-mode-enum branch August 12, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants