-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate docs for api.oxen.io #2155
Comments
we have programmatic comments in our config gen as well as other hints about usage, thinking we make an executable that:
then you can do something like: for sect in $( docgen sections ) ; do
for opt in $( docgen opts $sect ) ; do
docgen markdown $sect $opt
done
done > lokinet.md |
or... it could just spit out all the docs |
@majestrate - can I work on this to generate docs using commands? |
go ahead |
@majestrate - I created a shell script according to the points you mentioned above. Do you think it is workable? let me know what you think.
|
On Tuesday, 23 May 2023 01:13:03 EDT Neel Patel wrote:
@majestrate - I created a shell script according to the steps you mentioned
above. Do you think it is workable, let me know what you think?
I do appreciate the initiative but this wasn't exactly what i had in mind. i
dont think i properly articulated the underlying task in this issue, this is
my bad. i'll try to rephrase this in a much more concise way so that it's
unambiguous on what i am looking for here.
inside lokinet, we have a zmq rpc server with a bunch of endpoints that you
can call. these endpoints do various bits and bobs and they are at the moment
100% undocumented (this code lives in the directory llarp/rpc/ under the
llarp::rpc namespace ). we recently redid how we defined those endpoints in the
code so that they are highly structured now. our ini config generation code is
highly structured too but that config code lets us attach comments to these
generated config options, and has a lot of other metadata tags relevant to the
underlying functionality, e.g. client only option, required option, deprecated
option, options which take multiple values.
what i am looking for is to add that kind of documentation / comments into the
structured definitions of our znq rpc endpoints so that we can have an seperate
c++ executable which output markdown docs of our rpc endpoints. this would be
very constexpr heavy C++ code so that this metadata is omitted when compiling
lokinet itself but not when compiling this new executable that outputs
markdown.
in oxen-core we have a python script that parses comment blocks. that feels a
bit hacky and the approach in our config subsystem feels like a much nicer way
to present the data. since the primary consumer of this is the api.oxen.io
documentation page and anyone extending this would already be balls deep in
the internals anyways, expecting them to not feel alienated by moving about in
C++ isn't an unreasonable constraint. additionally we could eventually use
this to springboard into unit tests for that part of the code, or maybe even
an entry point into proper integration tests. lots of future directions this
can go in, but the first thing that happens is the initial work to add the
foundation for that.
…--
~jeff
|
nevermind, we have not merged in the rpc refactor yet so that would need to be figure out first... hmmm. |
So this won't be done until rpc refactor is merged? |
yes correct |
we should make a util that will spit out markdown for api.oxen.io for lokinet's config options and the zmq rpc api.
The text was updated successfully, but these errors were encountered: