[WIP] readmegen: A utility for generating readme from specifications #115
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.
Description
Closes #114.
This PR contains an experimental utility
readmegen
that uses the connector specification to generate the connector readme. The specification contains a lot of useful information about how to configure the connector, but it's not enough to generate the full readme, as there might be intricacies that the user wants to add. Still, this could be a useful tool to generate the configuration info and keep it up to date.Why WIP? We need to figure out how this could fit in the development flow of implementing a connector. Ideally we should be able to trigger a make target that outputs the updated readme, without the need to manually add more stuff. This would allow us to run it as part of a CI action that checks if generated files are up to date (example), this way we'd ensure that the readme contains the newest information after an update of the SDK or after we change some configuration parameters.
There are also some quirks like displaying the parameter values as code blocks.
How to try it out
Build the tool:
Navigate to a folder containing the connector:
cd /path/to/conduit-connector-kafka
Note that the connector needs to point to the SDK version that contains this tool for it to work, so you need to update the SDK dependency:
Now you can execute
readmegen
, which will detect the connector based on the directory you are in:This will output the following text to stdout:
Expand
Conduit Connector Kafka
A Kafka source and destination plugin for Conduit, written in Go.
Source
Configuration Parameters
Destination
Configuration Parameters