-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add RPC documentation generator #291
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
- Coverage 44.46% 44.45% -0.01%
==========================================
Files 44 44
Lines 28006 27999 -7
==========================================
- Hits 12453 12448 -5
+ Misses 15553 15551 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for tackling this. It is a life quality improvement. I skimmed through the generator implementation. Current implementation didn't consider foreign types in enum/struct fields, right? For example, the Another thing users want to know is how are these types serialized and deserialized. For example, if I want to pass a A small problem of the generated document is that it seems the type name of any
|
yes, there are some improvements that need to be resolved:
|
9d293e0
to
01fd032
Compare
01fd032
to
c881ab3
Compare
Some other ways I have tried:
cargo doc
, but it's only available for nightly version of rustc, and we also need to convert fromjson
format to markdown format.JsonSchema
for all data structures which need to be listed in markdown, I think it's an invasive change, and there are some trivial issues need to be resolved, such as Fix the issues of strip and merge desc for code block GREsau/schemars#251The current simple but dirty solution https://github.com/chenyukang/rpc-doc-gen is based on
syn
crate, which may have some pitfalls but I think we can improve it later.