@ W-19991461 Enhance AmfHelperMixin and Namespace with gRPC support#77
Closed
@ W-19991461 Enhance AmfHelperMixin and Namespace with gRPC support#77
Conversation
* Added multiple gRPC helper methods to AmfHelperMixin for API and operation checks, stream type handling, service and method computations, and message schema extraction. * Updated TypeScript definitions to include new gRPC-related methods and properties. * Introduced grpcStreamType in Namespace for better integration with gRPC specifications.
* Introduced a comprehensive guide for new gRPC helper methods in AmfHelperMixin and AmfLoader. * Documented methods for service and method lookup, gRPC detection, stream type handling, and message schema extraction. * Included usage examples for API navigation, method documentation, and API summary components. * Highlighted compatibility with existing REST/RAML APIs and outlined current limitations and next steps for further enhancements.
* Introduced new files `grpc-api.json` and `grpc-api-compact.json` containing comprehensive gRPC API definitions based on the `simple.proto` file. * Structured the API definitions to include endpoints, operations, request and response payloads, and associated schemas. * Enhanced compatibility with existing API documentation and tools, facilitating better integration and usage of gRPC services.
* Added `grpc-api.json` and `grpc-api-compact.json` to the .gitignore exceptions to ensure they are tracked in the repository. * This change supports the recent addition of gRPC API definitions, enhancing project organization and file management.
… enhance AmfHelperMixin for topic computation - Added new agents-api.yaml and agents-api.json files defining the Hotel Reservations API. - Updated apis.json to include the new agents-api YAML file. - Enhanced AmfHelperMixin with a new method for computing topic values. - Introduced tests for the agents API to validate functionality and ensure correctness.
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Alex Perez <a***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
alexpmule
added a commit
that referenced
this pull request
Nov 28, 2025
#79) * Enhance gRPC support in AmfHelperMixin and related files - Added new helper methods for gRPC API support in AmfHelperMixin, including methods to check if an API is gRPC, retrieve service and method names, and compute stream types. - Introduced new gRPC API definitions in JSON format and updated the .gitignore to include new API files. - Updated TypeScript definitions to include new gRPC methods and properties. - Modified deployment workflow to switch Node.js version to 18 for improved compatibility. * 4.5.34
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.
Quick summary
gRPC Support Implementation in AMF Helper Mixin
🎯 Overview
This PR implements comprehensive gRPC support in the
amf-helper-mixinby adding 20+ new helper methods that enable API Console components to work seamlessly with gRPC APIs. The implementation provides detection, parsing, and utility methods for gRPC services, methods, stream types, and message schemas.🔧 Changes Made
1. Core gRPC Helper Methods
API Detection & Validation
Service & Method Extraction
Stream Type Handling
Schema & Message Processing
2. Namespace Extension
Added
grpcStreamTypeproperty to the core vocabulary namespace:3. AmfLoader Helper Methods
Enhanced
AmfLoaderwith gRPC-specific lookup methods:4. Test Infrastructure
🚀 Usage Examples
Basic gRPC Detection
Navigation Component Integration
Method Documentation Component
Stream Type Display
Using AmfLoader Helpers in Tests
🏗️ Implementation Details
Stream Type Mapping
The implementation maps gRPC stream types to HTTP methods in AMF:
unaryPOSTUclient_streamingPUBLISHCserver_streamingSUBSCRIBESbidi_streamingPUBSUBBMedia Type Detection
gRPC operations are identified by these media types:
application/grpcapplication/grpc+protoFile Structure
Following repository patterns, gRPC test data uses standard naming:
apis/grpc-api.json(regular model)apis/grpc-api-compact.json(compact model)🧪 Testing Strategy
Comprehensive Test Coverage
Test Categories
🔄 Migration Path
For Existing Components
_isGrpcApi()or_isGrpcOperation()Backward Compatibility
📚 Documentation
GRPC_HELPERS.md- Complete method referenceReady for integration into
api-navigation,api-method-documentation, and other API Console components!