Add script to generate RPC API methods and inputs#492
Merged
lossyrob merged 5 commits intomicrosoft:masterfrom Feb 11, 2025
Merged
Add script to generate RPC API methods and inputs#492lossyrob merged 5 commits intomicrosoft:masterfrom
lossyrob merged 5 commits intomicrosoft:masterfrom
Conversation
Expected usage: ./scripts/generate_ossdbtoolsservice_rpc_docs.py > rpc_api_docs.md
p-singh-ms
approved these changes
Oct 22, 2024
lossyrob
approved these changes
Feb 11, 2025
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.
When evaluating the
pgtoolsservice, I wasn't able to find a concise list of the RPC methods that were implemented. I've added a new script that inspects the Services which are loaded in the default configuration, and enumerates the RPC methods and their inputs. This should give an indication of the server capabilities, but the source code remains the best source of truth for the implementation details. The response types aren't mapped to request methods, so that is still left as an exercise to the developer. Future maintenace could add docstrings to all the request and response types, but the included method gives a good overview with minimal source code edits.This script will output markdown formatted text, and can be piped to a file (as was done and included in this PR).
Expected usage:
./scripts/generate_ossdbtoolsservice_rpc_docs.py > rpc_api_docs.md