Add comprehensive gRPC and GraphQL support to swagger-coverage-cli#8
Closed
Add comprehensive gRPC and GraphQL support to swagger-coverage-cli#8
Conversation
Co-authored-by: dreamquality <130073078+dreamquality@users.noreply.github.com>
Co-authored-by: dreamquality <130073078+dreamquality@users.noreply.github.com>
…ation Co-authored-by: dreamquality <130073078+dreamquality@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] support of gRPC / GraphQL
Add comprehensive gRPC and GraphQL support to swagger-coverage-cli
Sep 16, 2025
Owner
|
@copilot the new version is in the main branch, resolve conflicts and keep backward campapability with the main branch |
Copilot stopped work on behalf of
dreamquality due to an error
September 18, 2025 12:46
Owner
|
@copilot the new version is in the main branch, resolve conflicts and keep backward campapability with the main branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements comprehensive support for gRPC and GraphQL APIs in swagger-coverage-cli, extending it beyond just REST/OpenAPI specifications to provide unified test coverage analysis across multiple API protocols.
Features Added
🔧 gRPC Support
.protofiles to extract service definitions and RPC methods/package.service/methodand/service/method🌐 GraphQL Support
.graphql,.gql)🚀 Enhanced Architecture
New Modules:
lib/grpc.js- Protocol Buffer parsing and gRPC operation extractionlib/graphql.js- GraphQL schema parsing and operation extractionlib/match.jswith protocol-aware matching logicCLI Improvements:
.proto,.graphql,.gql)Usage Examples
Technical Implementation
Protocol Detection & Parsing
Smart Matching Logic
matchRestRequest()- Traditional HTTP/REST API matching (existing)matchGrpcRequest()- gRPC-specific URL patterns and body validationmatchGraphQLRequest()- GraphQL query syntax and field matchingBody Validation Enhancements
Testing & Quality
Documentation Updates
Backward Compatibility
This implementation maintains complete backward compatibility. All existing OpenAPI/Swagger, CSV, and Postman collection functionality continues to work exactly as before, with no breaking changes to the API or CLI interface.
The tool now provides unified API test coverage analysis across REST, gRPC, and GraphQL protocols, making it ideal for modern microservices architectures and multi-protocol API portfolios.
Files Changed
lib/grpc.js,lib/graphql.jslib/match.js,lib/postman.js,lib/newman.js,cli.jsreadme.md,package.json✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.