Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/openapi/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (c *Converter) Convert(specData []byte) (*config.MCPConfig, error) {
for path, pathItem := range doc.Paths.Map() {
// Create a tool for each HTTP method
for method, operation := range pathItem.Operations() {
if method == "options" {
if strings.EqualFold(method, "options") {
continue // Skip CORS options
}

Expand Down
1 change: 1 addition & 0 deletions pkg/openapi/converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ func TestConverter_Convert_SkipOptionsAndKeepSummaryAsDescription(t *testing.T)

cfg, err := converter.ConvertFromJSON([]byte(spec))
assert.NoError(t, err)
assert.Len(t, cfg.Tools, 1)
// Ensure GET tool is present with summary used as description
found := false
for _, tcfg := range cfg.Tools {
Expand Down