Thrift has a html generator:
(thrift --help
)
html (HTML):
standalone: Self-contained mode, includes all CSS in the HTML files.
Generates no style.css file, but HTML files will be larger.
If write a struct
like this
/**
* This is description of struct MyStruct
**/
struct MyStruct {
1: required i32 fieldOne = 2
}
running thrift --gen html
creates an html page with part like this:
Struct MyStruct
|Key|Field |Type|Description|Requiredness|Default value|
|---|--------|----|-----------|------------|-------------|
|1 |fieldOne|i32 | |required |2 |
This is description of struct MyStruct
But I don't found how to fill description
field?
Great question, this is hard to guess and not super well documented (yes I'm being generous). Here's the answer:
struct MyStruct {
/** This is how you add a description to a struct field */
1: required i32 fieldOne = 2
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With