Closed elpiel closed 2 years ago
I've posted a question on the Rust user forum to see if it's even possible to capture the scope of the doc test and use variables inside it to generate JSON examples:
https://users.rust-lang.org/t/macro-invocation-in-rustdoc-and-generating-examples/74759
/v5/channel/:id/accounting
AccountingResponse::<CheckedState>
/v5/channel/:id/spender/:addr
(auth required)SpenderResponse
/v5/channel/:id/spender/all
(auth required)AllSpendersResponse
/v5/channel/:id/validator-messages
@elpiel #534ValidatorMessagesListQuery
ValidatorMessagesListResponse
/v5/channel/:id/validator-messages
(auth required) @elpiel #534ValidatorMessagesCreateRequest
/v5/channel/:id/last-approved
@elpiel #534LastApprovedQuery
LastApprovedResponse
/v5/channel/:id/pay
(auth required)ChannelPayRequest
/v5/channel/:id/get-leaf
/v5/channel/dummy-deposit
(auth required) @elpiel #534/cfg
@simzzz #545
We need a way to easily document the REST API of sentry in using
rustdoc
. Two ideas come to mind:Doc macro for serialization (on hold)
We need to serialize to json & urlencode fir structs inside doc comments.
A similar macros to https://github.com/scrabsha/dep-doc with arguments of rust structs and expression:
let my_struct = MyStruct { field: .. }
with the following variants:
doc_urlencode!
- urlencode the struct and print it in docsdoc_json!
- pretty-print the struct in json format inside the docsBuilding docs
We now build docs based on
aip-61-adex-v5
branch with default path tosentry
crate and we deploy it with GH pages at:https://ambiretech.github.io/adex-validator-stack-rust