You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add tag-based directory grouping for Swagger generator (#53)
* feat: Add tag-based directory grouping for Swagger generator
- Modified MakeSwaggerMcpToolCommand to create tag-based directories (Tools/Pet/, Tools/Store/, etc.)
- Updated MakeMcpToolCommand to support subdirectories and namespaces
- Updated MakeMcpResourceCommand to support subdirectories and namespaces
- Added createTagDirectory() method to convert tags to StudlyCase directory names
- Tools and resources now organized by OpenAPI tags for better organization
Co-authored-by: Sangrak Choi <[email protected]>
* Fix styling
* feat: Add comprehensive test coverage for tag-based directory grouping
- Add MakeSwaggerMcpToolCommandTest.php with createTagDirectory() method tests
- Add MakeMcpToolCommandTest.php with tag directory path and namespace tests
- Extend MakeMcpResourceCommandTest.php with tag directory support tests
- Add TagDirectoryEdgeCasesTest.php with comprehensive edge case coverage
- Test special characters, unicode, empty tags, namespace collision prevention
- Add integration tests for full swagger-to-tools generation with tag directories
- Ensure backward compatibility and proper config registration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Sangrak Choi <[email protected]>
* Fix styling
* feat: Add path-based grouping option and remove backward compatibility
- Add grouping strategy options: tag (default), path, none
- Implement path-based directory grouping using first path segment
- Remove all backward compatibility code (116 lines)
- Deleted selectEndpoints(), selectByTag(), selectByPath(), selectIndividually()
- Removed unused property
- Clean up legacy endpoint selection logic
- Update tests with comprehensive coverage for both grouping strategies
- Add 8 new test cases for path-based grouping functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Sangrak Choi <[email protected]>
* Fix styling
* feat: Add interactive CLI prompts for grouping selection
- Remove default value from --group-by option
- Add getGroupingOption() method with interactive prompts
- Prompt users to choose between tag, path, or none grouping
- Default to tag-based grouping when no selection made
- Add comprehensive test coverage for interactive behavior
- Update existing tests to use new groupingMethod property
Co-authored-by: Sangrak Choi <[email protected]>
* Fix styling
* feat: Add preview examples for grouping options in interactive CLI
- Show real endpoint examples for each grouping strategy (tag, path, none)
- Display directory structures with actual file paths before user selection
- Add generateGroupingPreviews() method to parse swagger and create samples
- Enhanced user experience with color-coded folder icons and clear formatting
- Comprehensive test coverage for preview functionality
- Limit previews to 6 items for clean CLI display
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Sangrak Choi <[email protected]>
* Fix styling
* fix(commands): improve special character handling and no-interaction mode
- Fix MakeSwaggerMcpToolCommand to properly handle special characters in tag names
- Convert special characters (/, ., @, -, _) to StudlyCase directory names
- Default empty or whitespace-only tags to 'General' directory
- Add proper --no-interaction mode support for automated testing
- Fix command constructors to properly inject filesystem dependency
- Improve auto-registration logic in programmatic and no-interaction modes
- Fix MigrateToolsCommand backup handling in no-interaction mode
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* fix(commands): improve tool config registration and test reliability
- Fix backslash escaping in MakeMcpToolCommand for proper class name registration
- Add handling for empty tools array in config file
- Update tests to use POST instead of GET for proper tool generation testing
- Remove trailing whitespace in MakeSwaggerMcpToolCommand
- All 135 tests now pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* fix: change command name to make:mcp-tools-from-swagger
- Changed from make:swagger-mcp-tool to make:mcp-tools-from-swagger for clarity
- Updated all tests to use the new command name
- Command now clearly indicates it generates multiple tools from swagger
* refactor: rename command class to match command name
- Renamed MakeSwaggerMcpToolCommand to MakeMcpToolsFromSwaggerCommand
- Renamed test file to MakeMcpToolsFromSwaggerCommandTest
- Updated all references in tests and service provider
- Better alignment between command name (make:mcp-tools-from-swagger) and class name
* Revert "refactor: rename command class to match command name"
This reverts commit 4129ee8.
* Revert "fix: change command name to make:mcp-tools-from-swagger"
This reverts commit 6c656ff.
* docs: Update README.md with new grouping options for Swagger generator
- Added documentation for --group-by option (tag, path, none)
- Documented interactive grouping selection with preview
- Updated v1.4.0 changelog to highlight grouping strategies
- Added examples showing all three grouping methods
- Enhanced key features list with organization strategies
Co-authored-by: Sangrak Choi <[email protected]>
* feat: enhance Swagger MCP generator with improved interactive preview
- Replace "General/" folder with root directory for no-grouping option
- Add comprehensive statistics in interactive preview (total endpoints, tools, resources)
- Show directory structure with file counts per group
- Display actual file examples with HTTP methods and paths
- Add "... and X more files" indicators for large groups
- Improve visual hierarchy with tree-style formatting
- Update README.md with v1.4.2 enhancements documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* Fix styling
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Sangrak Choi <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: kargnas <[email protected]>
0 commit comments