Add script to generate RPC API methods and inputs #492
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